A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F8] [Help] Preloader appears late

  1. #1

    [F8] [Help] Preloader appears late

    Hi, I know this is a known issue but I haven't found any solution.
    My preloader only appears once it has loaded 32% of the game.. wich can leave some people with a blank screen for quite long if they have a slow connection.
    I think it has something to do with the loading the music on the first frame or something. (but I have to use that option or the musics won't play)

    I don't know if you need this, but just in case:
    Preloader code (first frame) I have a bar and a percentage text
    LOADED = Math.round(getBytesLoaded());
    TOTAL = Math.round(getBytesTotal());
    TEXT = Math.round(PERCENT*100)+"%";
    setProperty(BAR, _xscale, (_root.getBytesLoaded()/(_root.getBytesTotal()))*100);
    if (LOADED == TOTAL)
    {gotoAndPlay (3);}
    and on the second frame
    Last edited by SnailsAnimation; 09-06-2007 at 05:08 PM.

  2. #2
    Join Date
    Apr 2001
    some things you may have done wrong:
    - used components (bloated code for simple people, puts all its content before the first frame)
    - used alot attachMovie and thus linkage Ids in the library and propably by default left the radio button "store before 1st frame". Its basicly the same effect as the attachMovie stuff it all gets preloaded before the 1st frame (thus before your preloader) until you disable the option "store before first frame) and place the movieClips instead outside the stage on the first frame where they are needed.

    btw. your preload code is very flash4 stylish,- mind to update?, like:
    PHP Code:
    _root.onEnterFrame = function(){
    getBytesLoaded() / getBytesTotal();
    TEXT int(p*100)+" %";
    BAR._xscale p*100;
    getBytesLoaded() == getBytesTotal() && int(getBytesTotal()) > 0){

  3. #3
    Senior Member
    Join Date
    Jun 2007
    Nottingham, England
    Also; if your preloader is fairly graphically intensive. Backgrounds etc; you might want to "preload the load". Insert a blank frame before your preloader frame and simply use the ifFrameLoaded(); condition.

    Hope this helps - Chris.

  4. #4
    Thank you for the tips. What I did is uncheck the "export in first frame" option in "Linkage". After that I put all the sounds that had "Linkage" in frames after the preloader, but with sync set to "stop". Now the preloader starts at 1%

  5. #5
    ...dishing dimes on an .fla! pointguard's Avatar
    Join Date
    Dec 2001
    Cambridgeshire, England
    I do a simliar thing, but I insert another scene in my movie after the preloader, where I place all my exported clips, etc. Then justy tell the preloader to goto and play Scene 1 (the scene after the 'skipped scene').

    probably a crap way of doing it but thats what works for me, been using that method for ages now...

  6. #6
    Not a bad idea actually

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