Global Variables within Flex Applications

The question of how to set up global variables in a Flex application came up on the Flex Components list recently, and as it comes up every so often, I figured I would blog one of the answers.

This is actually very easy. Just define a public variable within your main application class, like so:

[code][/code]You can then access that variable from anywhere within the Flex application via:[code][/code]If you need to, you can still make the variable bindable.Post and questions or suggestions in the comments.