Preloading in AS 3.0
Okay, how does one make a preloader in AS 3.0 for THE ENTIRE swf?
I'm certainly generally familiar with making preloaders in Flash, yet with changes to the Flash environment in the last few years, my situation may not be so straight forward:
I have a very developed Flash 3.0 application where the timeline is not used in the traditional way, everything is Class based, and there are all kinds of assets in the library that are used dynamically.
This type of preloader is useless, because (I guess) that "this.loaderInfo" is associated to the timeline (which has nothing on it) :
public function Preload () {
this.loaderInfo.addEventListener(Event.COMPLETE, initApplication);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
}
public function showProgress(theProgress:ProgressEvent):void {
var percent:Number = Math.round((theProgress.bytesLoaded / theProgress.bytesTotal )*100 );
trace(percent + " %");
this.graphics.clear()
this.graphics.lineStyle(1, 0xFF0000, 1)
this.graphics.beginFill(0xFF0000)
this.graphics.drawRect(100,100,percent,10)
}
public function initApplication(myEvent:Event):void {
trace("Loaded !");
init();
}
After I found some reference to a tip on-line, I went thru my library and adjusted the Linkage properties (for the movie clips that are Linked to Classes) to NOT be "export in frame 1", yet I'm not really certain what this does, and doing this started to create other problems. Is that any kind of solution in this case?
Isn't there a straight forward way to go about this? A property of the SWF that includes ALL of the ASSETS of the SWF independent of the timeline?