A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: preloader

  1. #1
    Newbie Forever It Seems Dar's Avatar
    Join Date
    Aug 2002
    Location
    Columbus,OH
    Posts
    218

    preloader

    Recently I have had a problem with my preloaders. The preloader I have made are simple
    scene named "preloader" layer 1 frame one code:

    total_bytes = _root.getBytesTotal();
    loaded_bytes = _root.getBytesLoaded();
    remaining_bytes = total_bytes-loaded_bytes;
    percent_done = int((loaded_bytes/total_bytes)*100);
    bar.gotoAndStop(percent_done);
    ifFrameLoaded ("Scene 1", 2) {
    gotoAndPlay("Scene 1", 1);
    }

    layer 1 frame two code:

    gotoAndPlay(1);

    layer 2:

    is a dynamic text field that displays remaining_bytes

    it seems to work, not going to the next scene until everything is loaded only the dynamic text field doesnt show the remaining_bytes until its up to 90%

    anybody had this problem?
    USING MX

  2. #2
    Member
    Join Date
    Feb 2002
    Posts
    74
    I've just had a good hard look at my standard preloaders for a similar reason too, and after an interesting heated debate on the Flashkit forum (this is a frequent question much to the irritation of veterans!), I was pointed in the direction of a great tutorial which tells you how to store the preloader in a separate movie:
    http://www.flashkit.com/board/showt...oader+oldnewbie

    Good luck!

  3. #3
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Do a test movie. While in that window, go up to the View menu and make sure Streaming Graph and Bandwidth Profiler are both checked. Look at frame 1. Is there a huge spike in frame 1? Are you using components, embedded text, sounds with actionscripting? All those must load in frame 1, which itself must load fully before you see anything of frame 1, including that dynamic text box. If that's the case, then use the oldnewbie preloader. It works great.

  4. #4
    Newbie Forever It Seems Dar's Avatar
    Join Date
    Aug 2002
    Location
    Columbus,OH
    Posts
    218
    well I ended up making a layer for the bg music and unchecking the export to action script and now im down to around 35 to 30% and the preloader is visible.

    when you say embeded text, do you mean static text?

    I also made a test movie, uploaded an mp3 to a layer used 3k frames and the preloader started right away
    USING MX

  5. #5
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Static text is a little tricky, and confusing at first. Static text, by default, is "Always" embedded, unless the little "Use Device Fonts" box is checked. Kind of turns the mind to a pretzel trying to figure out why they made it that way, but that's how it is.

    To see the effects of this, with the fla open, go to File/Publish Settings. In the Flash tab, check the Generate Size Report box and publish. Now go open it, it's in the folder on your hard drive. Scroll all the way to the bottom. That's generally where the embedded text is. You can see the bytes it adds to the file when the use device fonts box is unchecked. Now, check the box and publish another size report. You can see that just a line of text can add a couple of Kbytes to the swf.

    Of course, using device fonts makes the text look like crap, even though it may be Arial, so this is just an example.

    By the way, few know this, but each character and space used in the actions panel also adds 1 byte to the swf. Imagine how fast that can add up!

  6. #6
    Newbie Forever It Seems Dar's Avatar
    Join Date
    Aug 2002
    Location
    Columbus,OH
    Posts
    218
    yeah Ive noticed that about static text. I dont think it would use anymore space to make the text in Paintshop and import as an image, I know it looks better.

    thanks for your help
    USING MX

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