AS3 tricks
I'm currently experimenting with AIR applications as a replacement for our usual practice at work of developing a swf and then publishing it as an .app or .exe in the Flash IDE. I always have Flex Builder open to edit my classes and find it a bit annoying to have to create an empty fla, point it at my main class, and then switch back and forth between flash and flex to publish and test. Now, with a target of an AIR application, I get cross platform compatibility and the ability to test and publish everything from the same IDE (Flex Builder).
So far so good. It was a little tough figuring out how to stuff my actionscript into a flex holder but since figuring that out it's been smooth sailing. I set up a flex project, an AIR desktop application, and added a "Module" under Project>Properties>Flex Modules that points at my Main.as class, outputting a Main.swf. The flex mxml does little more than load Main.swf and manage switches between fullscreen and windowed mode. Communication between the swf and the mxml happen via singletons; for example, there is an external settings file containing a list of object names, properties, and values. The class loading this file is accessed by both (but instantiated by neither) the mxml and the swf, and both clients subscribe to the "I'm done loading the settings" event.
I'll be accumulating tricks, methods, and concepts here under the names "AS3 tricks." It's a place for me to accumulate some of the more obscure code I've been working on, to describe how it works and why it was done in the way it was done. In other words I'm probably going to include alternate ideas I tried, list out pros and cons, and describe why I went with the code I'm using. Your needs may not be the same as mine, and my needs may change in the future, so listing out the alternatives should be useful to someone.