|
-
flash loader in firefox locking up on the first frame?!?!
hey im doing a website and using a flash header. this has some movie clips and it needed a loader. in Firefox it will lock up when clicking from page to page and stop on the full loader bar. im using cs3 master collection and as3 the website is paradisebeergarden.ph this is driving me nuts as it is only doing this in Firefox! thanks!!!!
-
if i delete cache and reload, it works - this leads me to believe you need to add a complete handler in addition to the progress handler, that reacts as if the preload executed all the way
-
hey thanks for your reply. here is my code that is located in the actions layer first frame the loader is the only thing located in frame one in the root. here is my code
stop();
this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onProgress(e:ProgressEvent):void
{
var loaded:Number = e.target.bytesLoaded;
var total:Number = e.target.bytesTotal;
var pct:Number = loaded/total;
loader_mc.scaleX = pct;
loaded_txt.text = "Loading... " + (Math.round(pct * 100)) + "%";
}
function onComplete(e:Event):void
{
play();
}
its driving me crazy.
I wanted a background to the loader and was using a more compressed version of the header all on the bottom layer but the loader wasn't showing up until 30% which to me is unacceptable so now im just trying to get the loader to initiate correctly. Im sure its something silly. my loader is in the root time line should it be in its own movie clip and called to in the code?
sorry for all the questions i sure do appreciate your help.
-
hmm i don't see anything obviously wrong, but i don't use frames so i might not be noticing something... i guess i'd suggest separating the components - put your main application structure in a separate FLA and load that using a Loader object in the file containing just the loader.
-
I've seen some flash player versions in some browsers not fire COMPLETE for some reason. You can use listeners for both INIT and COMPLETE to be safe:
PHP Code:
stop();
loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
loaderInfo.addEventListener(Event.INIT, onComplete);
loaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onProgress(e:ProgressEvent):void {
var loaded:Number = e.target.bytesLoaded;
var total:Number = e.target.bytesTotal;
var pct:Number = loaded/total;
loader_mc.scaleX = pct;
loaded_txt.text = "Loading... " + (Math.round(pct * 100)) + "%";
}
function onComplete(e:Event):void {
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
loaderInfo.removeEventListener(Event.INIT, onComplete);
play();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|