Hi all. I have this major problem I hope someone can help me with.
I simply want to have a preloader with a loadbar to load my external movies in flash 2004… HOW can I do this? Ive been searching all over the net, but cant find anything I can use…
I found this code by “newhopekenny” in a topic, it works fine, but I was wondering if there is some way to adapt it to work in external movies. I’ve tried simply changing the paths but that didnt work out…
the code Im using is as follows:
_root.stop();
// initialize the loadbar
_root.loadBarMC.onEnterFrame = function() {
// stop the playhead
// declare some variables
var loaded = _root.getBytesLoaded();
var total = _root.getBytesTotal();
var totalPercent = Math.round((loaded/total)*100);
// make the width of the loadbar
// equal to the percent loaded
_root.loadBarMC.loadBar_bar._xscale = totalPercent;
// echo variables to output window
trace("loaded = "+loaded);
trace("total = "+total);
trace("loadBar width = "+totalPercent);
// if the movie is loaded, get the
// playhead going again
if (loaded == total) {
_root.loadBarMC.gotoAndPlay("loaded");
_root.gotoAndPlay(2);
trace("Loaded!");
// clear the onEnterFrame event
// so that it's not still running
// when it doesn't need to be
delete this.onEnterFrame;
}
};
Thx! :}