A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Preloader Causing Choppy Playback?

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Location
    Seattle
    Posts
    2

    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.

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    in your done function, you need to remove your event listeners. that should help a bit. Let me know if this helps.

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Location
    Seattle
    Posts
    2
    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.

  4. #4
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center