Add Preloader To a 1-swf AS3-Only Project
For a recent project, I had the need for a swf to ‘load itself’. This is challenging in an AS3-Only Project because all code and compile-time assets are baked in, and baked-in to ‘frame 1′ of the application. Flash can’t show ANYTHING until all filesize for frame1 is loaded.
Solution? – The (un)documented Frame Metadata Tag. Thanks to Keith Peters’ bit-101 for background info. I’ve created a great demo that is simple to follow.
FYI – This is basically how Flex works, showing a preloader before it loads (in a 1-swf setup).
UPDATE
If you want your ‘SystemManager’ class in this demo to be more configurable. Consider using ‘Custom Compiler Arguments’. See this post.
Next Steps
- Checkout the sourcecode (See ‘Member Resources’ below) for a simple example.
Member Resources
You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.
Ready To Join?
- Sign up for 'Free Member' level now. Its free!
- Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
- Log in and enjoy!












[...] For a recent project I had the need for an as3-only swf to ‘preload itself’. See this post. [...]
Thanks for your example
It’s very complete.