I’m loading an external swf into a blank movie clip and I would like to add a preloader to it. I’ve used this code for my preloader:
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
_root.gotoAndPlay(2);
this.pootxt = “movie loaded”;
} else {
_root.gotoAndStop(1);
this.pootxt = “loading (” + bytes_loaded + “/” + bytes +")";
}
}
It does not seem to work. I think (and I could be way off as I’m pretty new at this) that the _root.gotoAndPlay(2) is the cause of the problem. It seems to target my main timeline instead of the external swf…
Any help will be much appreciated…
Thanks,
-P.