okay i’m new to mx2004 and i’m trying to get a movieclip that loads dynamic content (jpegs) to have a little preloader.
i think i’ve gotten this to work in the past but this code is doing nothing for me now. it seems like it should work…
I have a movieclip with the code on it and a movie clip (picPreload) on the layer above the clip (it contains a loadbar shape which masks an animated bar). both the movieclip that loads the jpegs and the preloader clip are in the same movieclip.
onClipEvent (enterFrame) {
picPreload.barberPole.setMask(picPreload.loadBar);
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
if(bytes_loaded != bytes_total){
picPreload._alpha=100;
picPreload.loadBar._width = getPercent*128;
}else{
if (bytes_loaded == bytes_total) {
picPreload._alpha=0;
}
}
}
thanks for any help… can’t think clearly aafter 4 hours of sleep.