Question
How can I put a text preloader into this code?
Hi
I've been working on a site where swf's are loaded into main movie with transitions between the sections. I have the following code on the mcContainer...
How can I add a text percentage preloader into this code?
I usually use a the following code for preloaders...
... but I'm not sure where to add the code into the exisiting code, as I'm a beginner at AS.
Any help will be greatly recieved.
Thanks
Wayne
I've been working on a site where swf's are loaded into main movie with transitions between the sections. I have the following code on the mcContainer...
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {
loaded = true;
_root.transition.gotoAndPlay("opening");
}
}
}
How can I add a text percentage preloader into this code?
I usually use a the following code for preloaders...
myLoaded = Math.round(getBytesLoaded());
myTotal = Math.round(getBytesTotal());
myPercent = myLoaded/myTotal;
myBar._height = myPercent*97;
myText = Math.round(myPercent*100)+"%";
if (myLoaded == myTotal) {
gotoAndStop("Scene 1", "loaded");
} else {
gotoAndPlay("Scene 1", "preloader");
}
... but I'm not sure where to add the code into the exisiting code, as I'm a beginner at AS.
Any help will be greatly recieved.
Thanks
Wayne