A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F8] Preloader doesn't work

  1. #1
    Member
    Join Date
    Feb 2008
    Posts
    83

    [F8] Preloader doesn't work

    I have tried two different preloaders now and they both do the same thing. A blank white box lasts for about a minute, then the preloader shows up for a fraction of a second, then the game loads.

    Here's my setup. There are two layers. On the first and second frame of the top layer, I have the bar directly on the stage. Frame two has the following code in the frame:

    Code:
    if (_root.getBytesTotal() != _root.getBytesLoaded()){
    gotoAndPlay(1); 
    }
    bar_mc._xscale = (_root.getBytesLoaded()/_root.getBytesTotal())*100;
    The third frame has a stop command in the top layer, and the game code begins in the bottom layer.

    Any suggestions on what I am doing wrong? Thanks.

  2. #2
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    you probably have things exported for actionscript and export in first frame. Go to your library and uncheck "export in first frame", then drag all your export content from the library onto a blank frame which will never be seen.
    lather yourself up with soap - soap arcade

  3. #3
    Member
    Join Date
    Feb 2008
    Posts
    83
    Quote Originally Posted by mr_malee
    you probably have things exported for actionscript and export in first frame. Go to your library and uncheck "export in first frame", then drag all your export content from the library onto a blank frame which will never be seen.

    Ok, I unchecked all of the "export in first frame" and dragged everything into a blank frame, but now the preloader bar just stays on the screen and none of the elements load.

  4. #4
    Member
    Join Date
    Feb 2008
    Posts
    83
    Ok, so does the blank fram have to come BEFORE the rest of my code? because that seems to have fixed that problem at least. Ok I will test this and let you know, either way, thanks! You have always been the most helpful user on this board.

  5. #5
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    if all else fails, create an external preloader. I can't help without seeing the fla,

    the setup should be:

    first frame: (preloader code)
    second frame: all assets
    third frame: initialization
    lather yourself up with soap - soap arcade

  6. #6
    Member
    Join Date
    Feb 2008
    Posts
    83
    Quote Originally Posted by mr_malee
    if all else fails, create an external preloader. I can't help without seeing the fla,

    the setup should be:

    first frame: (preloader code)
    second frame: all assets
    third frame: initialization


    Ok, I got it working. The problem was that the preloader I was using for some reason had me using the first 2 frames instead of just the first one. Thanks for the help, I'll send you an early link to my game before it goes live.

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