|
-
problem with jpg preloader
I know that people ask this question all the time, but I've not found a tutorial that works yet, I've looked just about everywhere.
I'm trying to preload 4 dynamic jpgs. I put this script on the key frame that has the host_mc on it and the loadMovie action too...I don't think its working...is there a more effective way to do this? I found this script in a tutorial on this site, if anyone wants to look at it:
http://www.flashguru.co.uk/000044.php
code: this.loadMovie("homepage_clear.jpg");
//check the download status of the external
//movie once every frame
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (this.homebackg_mc.background2_mc.host2_mc.getByte sLoaded()/this.holder.getBytesTotal())*100;
if (!isNan(percent)) {
trace(percent+"% loaded");
} else {
trace("0% loaded");
}
if (percent == 100) {
delete this.onEnterFrame;
}
};
-
percent = (this.homebackg_mc.background2_mc.host2_mc.getByte sLoaded()/this.holder.getBytesTotal())*100;
it's either "this.homebackg_mc.background2_mc.host2_mc"
or "this.holder"
gparis
-
Hi,
it seems that getbytestotal returns 0 while loading a jpeg and the real size only after completion
Musicman
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
|