Hi guys, it’s me again…
I’m trying to use this preloader
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
if (percent == undefined) percent = 0;
percent -= (percent-((loading/total)100)).25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*7.00;
if (percent>99) {
_parent.gotoAndStop(2);
}
}
It successfully does it’s job in Scene 1 of the main timeline. However, when I try to reuse it in Scene 2, it appears as if it’s just reloading the data from Scene 1.
The scenario is in Scene 1, a button jumps to Scene 2, in which case the Scene 2 preloader in frame 1 loads up the data of that scene. But because of the way the code is done, I think the the copied and pasted preloader code is just reading Scene 1 again. Is there a way I can modify the code to reuse the code & preload it’s residing Scene i.e. Scene 3,4,5 etc. ?
Thanks a million guys.