Hi guys,
I guess this is quite simple but i just can’t get around this… What i have is a preloader on the first scene and when scene 2 is loaded then it plays it… the problem is not here, the problem is with my loading bar… I have the loading bar on the first frame of my preloader scene but it’s inside a movie clip ( at frame 10 as i can remember ). I have this code on it:
onClipEvent (enterFrame) {
this.gotoAndStop(int(_parent.getBytesLoaded()*100/_parent.getBytesTotal()));
}
Ok, i tried to edit it and all that crap, but whenever i play the movie the bar is fully loaded ( meaning it won’t load normally )… I guess the problem is that i’m not giving the path correctly… but i can’t figure out how to give it… Ahh, and yeah, the bar is inside an MC called “pre” and the bar is called “bar”…
I don’t know if this helps, all preloader codes are the same but here is the code i’m using ( this is placed on the first frame of the preloader scene, and it’s not inside any MC, it’s only on the first frame with the second frame “looping the first” ):
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
ifFrameLoaded ("mainStage", 1) {
gotoAndPlay(3);
}
Any help is appreciated,
Kind regards,
Biro Barna