Working with flashvars in Flex 4

Last night I converted my CFMU project from Flex 3 to Flex 4. There were a couple differences but a lot easier than I was expecting so that was a pleasant surprise. For my project one of the major things I had to convert was the way I read in flash vars and lucky for me it was a simple 1 line change. In my multi uploader there are all kinds of variables that are passed in using flash vars and in the previous source it looked like this.

If you check out the Application class and take a look at the property application you will notice it is Deprecated. The note also tells us that we should instead use FlexGlobals.topLevelApplication. This was an easy enough change but an important 1 to point out.

Big thanks to Seth Bienek for helping me out on this.

Categories: Flex

About The Author

My name is Dan Vega and I am a Software Developer based out of Cleveland OH. I love to play with new technologies and write about my experiences here. When I am not busy being a full time geek I love to lift heavy weights and hang out with friends and family. If you have any questions please don't hesitate to contact me.

Follow me on:
  • http://theolagendijk.wordpress.com Theo Lagendijk

    Thanks!

  • sivabharathi

    Hi,
    I have one problem, can you help me. I am using flex 4. Now i want to send the data form html to flex. How i can send form html and how i can retrive the data in flex. Help me as soon as possible

    Regards,
    sivabharathi