Hey all:
I have two swf’s: a “container” movie with a button that loads another swf into an empty movie clip. The loaded movie is large, so I added a preloader Kirupa developed that has been working very well for me. Everything works and tests fine offline. However, when I hardcode the HTTP path into container’s AS for the loadMovie and post online, the preloader for the loaded movie stops working properly.
Here is the AS for that preloader:
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
_root.gotoAndPlay(2);
this.loadtxt = “movie loaded”;
} else {
_root.gotoAndStop(1);
this.loadtxt = “loading map(” + bytes_loaded + “/” + bytes +")";
}
}
Instead of displaying load progress (“loading map (xxx/xxx)”), the preloader displays “movie loaded” until the movie has loaded. I suspect the problem might also lie with the code in the container movie. Here’s the script to call the movie (action is on a frame, not the button):
map.onPress = function() {
_root.createEmptyMovieClip(“container”, 1);
loadMovie(“http://www.chile2002.org/curriculum/interactive/geopolitical/mag.swf”, “container”);
container._x = 200;
container._y = 0;
};
The FLAs were too big to attach, but you can see the movie (& problem) here:
http://www.chile2002.org/curriculum/geopolitical.html
(click “see interactive feature”)
Thanks much,
JC