I made a website, which has some bitmaps in it, sounds, music...
the swf file is only 2MB.
I did the website on a scene, then created another scene and put the loading code inside it with one image at background which is only 18kb.
the problem is that the loader doesn't show until 70% of the movie is loaded...
I tried to remove the image but same happens.
now the loading page has nothing but some texts, and percent text, loading bar.
loading code (AS2):
totalBytes = Math.round(getBytesTotal()/1024);
loadedBytes = Math.round(getBytesLoaded()/1024);
percentDone = Math.round((loadedBytes/totalBytes)*100);
_root.PercentText.text = percentDone+"%";
//BackGround._alpha = 100 - percentDone;
if (_root._framesloaded>=_root._totalframes) {
gotoAndPlay(3);
}
that was in the first frame, the second frame has a gotoAndPlay(1);
the third frame releases the timeline to reach the site scene...
I always use this code, and it works fine even with huge files with videos, but not this time!
ok solved! it seems sound(bg music) was being loaded at the first frame (a check box found at the sound properties on the library).
unchecked then the sound wasn't exported at all, so I put a stop event for that sound so I can access it with actionscript....
since the problem is solved, do u think the way I load my movie is noobish?
the swf file is only 2MB.
I did the website on a scene, then created another scene and put the loading code inside it with one image at background which is only 18kb.
the problem is that the loader doesn't show until 70% of the movie is loaded...
I tried to remove the image but same happens.
now the loading page has nothing but some texts, and percent text, loading bar.
loading code (AS2):
totalBytes = Math.round(getBytesTotal()/1024);
loadedBytes = Math.round(getBytesLoaded()/1024);
percentDone = Math.round((loadedBytes/totalBytes)*100);
_root.PercentText.text = percentDone+"%";
//BackGround._alpha = 100 - percentDone;
if (_root._framesloaded>=_root._totalframes) {
gotoAndPlay(3);
}
that was in the first frame, the second frame has a gotoAndPlay(1);
the third frame releases the timeline to reach the site scene...
I always use this code, and it works fine even with huge files with videos, but not this time!
ok solved! it seems sound(bg music) was being loaded at the first frame (a check box found at the sound properties on the library).
unchecked then the sound wasn't exported at all, so I put a stop event for that sound so I can access it with actionscript....
since the problem is solved, do u think the way I load my movie is noobish?