cowman345
07-17-2005, 05:12 PM
Creating a photogallery. I'm loading the full-sized photos into a movieclip on my main timeline with the following bit of code:
this.loader_mc.loadMovie(whatToLoad, "loadSpot_mc");
I have a loadbar image set up on another layer of my main timeline with the following actionscript (note: i checked to make sure all objects are properly defined, etc.):
frame 1:
bytes_loaded = Math.round(this._parent.loader_mc.getBytesLoaded() );
bytes_total = Math.round(this._parent.loader_mc.getBytesTotal()) ;
getPercent = bytes_loaded/bytes_total;
this.loadbarBar_mc._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
frame 2:
gotoAndPlay(1);
frame 3: blank
-----
So the problem is the loadbar isn't moving... it's hanging around looking 50% loaded, and the loadText says 100% even while images are loading. I'm not too experienced at loading movies dynamically, so i'm sure i'm doing something wrong. Any help would be greatly appreciated!
-dave-
this.loader_mc.loadMovie(whatToLoad, "loadSpot_mc");
I have a loadbar image set up on another layer of my main timeline with the following actionscript (note: i checked to make sure all objects are properly defined, etc.):
frame 1:
bytes_loaded = Math.round(this._parent.loader_mc.getBytesLoaded() );
bytes_total = Math.round(this._parent.loader_mc.getBytesTotal()) ;
getPercent = bytes_loaded/bytes_total;
this.loadbarBar_mc._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
frame 2:
gotoAndPlay(1);
frame 3: blank
-----
So the problem is the loadbar isn't moving... it's hanging around looking 50% loaded, and the loadText says 100% even while images are loading. I'm not too experienced at loading movies dynamically, so i'm sure i'm doing something wrong. Any help would be greatly appreciated!
-dave-