Copy link to clipboard
Copied
So I'm rather new to preloaders in Flash. However, I found a decent tutorial online, and after completing it, began to create a preloader for my movie project. Everything was going just dandy until I viewed the movie. Because I wanted to see the preloader, I tested the movie and simulated a download... and was greeted with a white screen. I waited for some time, and suddenly the preloader appeared, loading from 80% onward. Basically, the first 79% of the preloader was represented by a blank screen. Does anybody know why I'm having this problem? If it would help, I've provided a link to the .fla file. The button isn't actionscripted yet, and the motion tween was just filler content so the preloader could be viewed. Thank you guys in advance! http://www.mediafire.com/file/7dq29r9n3e7oscj/The_Remembering.zip |
Copy link to clipboard
Copied
that is usually caused by having 80% of your swf's assets load before anything is visible on-stage. typically those assets consist of items exported for use by actionscript and embedded fonts.
the easiest, but not the only, remedy is to create a stand-alone preloader that contains only your preloader assets and that loads and displays the load-progress of your current swf (less the preloader assets).
Copy link to clipboard
Copied
So if I'm getting this right, 80% of the file is IN the preloader, thus causing this problem? When the movie gets longer (it's going to be 3-4 minutes total, currently I only have about 5 seconds motion tween), will this get somewhat remedied?
I guess I'm not completely clear on what you mean by "stand-alone preloader." Could you, by chance, point me in the direction of a webpage of video tutorial that explains this?
Copy link to clipboard
Copied
So if I'm getting this right, 80% of the file is IN the preloader, thus causing this problem?
not usually. usually it's items exported for use by actionscript and embedded fonts.
When the movie gets longer (it's going to be 3-4 minutes total, currently I only have about 5 seconds motion tween), will this get somewhat remedied?
no.
I guess I'm not completely clear on what you mean by "stand-alone preloader." Could you, by chance, point me in the direction of a webpage of video tutorial that explains this?
a stand-alone preloader is a swf that contains only your preloader assets and that loads and displays the load-progress of your current swf (less the preloader assets).
Copy link to clipboard
Copied
Here is an example to hopefully help. So this code is from the timeline of a separate swf file I created to load my main swf. My main SWF is called "ConcentricCS4.swf".
This code from frame 1 of the main timeline of my "Preloader.fla" file. I put a trace statement in there that rounds to the nearest whole number. Displaying the percentage to test. This make sense?
stop();
var myrequest:URLRequest = new URLRequest("ConcentricCS4.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);
myloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadFinished);
function progressHandler(event:ProgressEvent):void {
var loadprogress:Number = Math.round(event.target.bytesLoaded/event.target.bytesTotal*100);
trace(loadprogress);
Preloader.gotoAndStop(loadprogress);
}
function loadFinished (e:Event) {
addChild(myloader);
trace("finished");
removeChild(Preloader);
}