preloading external swf?
- Started
- Last post
- 4 Responses
- shtuker
Pleas help. I want to have a preloader for a swf that loads into another swf. I tried putting the preloader into the loaded swf, but the "_root" syntax was screwing with the parent swf. How do I get around this? Specific instructions would be very helpful. Thanks!
- shtuker0
By the way, here is the code that is currently on the preloader in the loaded swf:
onClipEvent(enterFrame){
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
goToAndStop(framesLoaded);
status.text = framesLoaded + " %";
if(framesLoaded >= 90){
_root.gotoAndPlay("shtuker");
}
}
- cajo0
why dont you use diferent levels, or put the swf you want to load into a movie clip and target!!
dunno just a tougth!
- shtuker0
I'm not sure I understand. Could you be more specific? Thanks.
- londonBoy0
replace your _root with _parent.
so:
onClipEvent(enterFrame) {
loaded = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
framesLoaded = Math.ceil
((loaded / total) * 100);
gotoAndStop(framesLoaded);
status.text = framesLoaded +" %";
if(framesLoaded >= 90){
_parent.gotoAndPlay("shtuke
r");
}
}