|
-
Why won't my external swf preloader work?
I have a swf called ladiesrings.swf that is a 6MB size file due to about 140 images that are dynamically loaded into a sliding photo gallery from the library.
Because this is such a large file, I need a preloader. So I've used a tutorial for an external swf preloader, and it's loading the movie, but it's still showing a blank page until the movie is loaded? I'm really confused. Why isn't this working?
First frame actionscript for preloader:
siteLoader.loadMovie("ladiesrings.swf");
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function() {
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
if (percentage == 99) {
delete this.onEnterFrame;
}
}
if (percentage == 99) {
this._parent.loadingBarFrame._alpha = 0;
this._alpha = 0;
delete this.onEnterFrame;
}
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
|