Quick Flash Tips #1: ‘-frame start ClassName’ compiler argument
This is simple but very handy little device that allows you to begin displaying your main application SWF before it’s actually loaded.
What the argument does is basically creates a second pseudo frame within your compiled SWF that starts your main app class. On the first ‘frame’ you will in general have only the classes needed to show the visual preloader. The effect is that you get an almost instantaneous preloader while the rest of the app loads so even in the scenario where you have a large application SWF or the user is on a very slow connection they won’t get a blank screen.
Personally I’ve settled on naming my first class ‘Main’, with the actual application hanging off a class called ‘Application’, so my arg looks like ‘-frame start Application’ or ‘-frame start tv.stinkdigital.projectName.Application’. I define a ratio of the total anticipated loading weight to the application SWF so that I can continue to load assets such as XML files and SWFs when the app has started whilst maintaining a smooth, consistent visual preloading progress from start to finish.