-
AS2 - Preloader in Trouble
Okay, I've gotten my preloader -mostly- working. It's on the very first frame, and does indeed show up as it should. Except... it only shows up when the rest of the file is 80% loaded. I want it to be visible right away, like a preloader should be. What do I need to do? Create a new scene, etc? If it helps at all, this is the code to the preloader - fairly basic:
Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
if (percent == undefined) percent = 0;
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
if (percent>99) {
_parent.gotoAndStop(2);
}
}
-
Okay, I figured out part of the problem - I have two music files, one a loop and the other the menu sound, set for export into the first frame. However, while removing that setting lets the preloader run smoothly, that causes the sound to stop loading.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|