-
Preloader Causing Choppy Playback?
I am working on a new portfolio site for myself. I am using CS3 and AS3 to complete this project. I am using embedded FLVs for transitions between sections on the site. These transitions play back reasonably smooth when I don't use a preloader. However, when I do use the preloader I get slow choppy playback.
To navigate between sections, you need to click on the screens on the wall and the printer.
With Preloader:
http://chrisrizzodesign.com/preloader.html
Without Preloader:
http://chrisrizzodesign.com/portfolio.html
The code from the preloader is as follows:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent .PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLET E, done);
l.load(new URLRequest("Portfolio.swf"));
function loop (e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done (e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}
Any pointers in the right direction would be greatly appreciated. Thank you for your time.
Last edited by FXFXFXFX; 10-27-2008 at 05:10 PM.
-
Senior Member
in your done function, you need to remove your event listeners. that should help a bit. Let me know if this helps.
-
I figured out the problem. I had the frame rate set to 12 in the preloader and 30 in the main swf.
Thanks jweeks. That's probably a good idea.
-
Senior Member
No Problem. Glad to help.
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
|