Skip to main content
February 28, 2007
Answered

Preloader starts late

  • February 28, 2007
  • 3 replies
  • 482 views
Hi, I've created a preloader for my 1mb+ flash movie. However, when I tried to load it, the screen was empty for a few seconds before the preloader suddenly pops up. By then, it had already loaded about 50%. I thought it was supposed to start immediately from 0% and load till 100%?

In the 1st frame I've the following AS:

totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay("start");
}


2nd frame:

gotoAndPlay(1);

and the 3rd frame is labeled "start". I've also assigned a dynamic text with the var name: percentDone.

Can anyone help on this? Thanks very much!
This topic has been closed for replies.
Correct answer bb73
What kind of elements do you have in your movie? If you are running things like components, mp3s, videos, etc., try right clicking on those items in the library, then choose "linkage." From there make sure "Export in first frame" is not checked.

3 replies

bb73Correct answer
Inspiring
February 28, 2007
What kind of elements do you have in your movie? If you are running things like components, mp3s, videos, etc., try right clicking on those items in the library, then choose "linkage." From there make sure "Export in first frame" is not checked.
February 28, 2007
quote:

Originally posted by: bb73
What kind of elements do you have in your movie? If you are running things like components, mp3s, videos, etc., try right clicking on those items in the library, then choose "linkage." From there make sure "Export in first frame" is not checked.


Bingo! Thanks mate!

February 28, 2007
A few things needs to be checked...

1. how many things(graphical assets) do you have on your first frame.......try to make it blank.....as less as possible.....

2. you are calculating byte size but sending playhead depending on the number of frames loaded .

3. Why are you converting bytes to kilobytes by dividing 1024?

$. and where does your preloader resides?
Inspiring
February 28, 2007
Im not too familiar with this preloader code you have... but why are you deviding bytesTotal and bytesLoaded by 1024???
February 28, 2007
I'm sorry I forgot to include some things: I've actually got 2 more dynamic texts named "totalBytes" and "loadedBytes". So I can let users know how big is the file and how much has been loaded in terms of kilobytes.