I am gonna post my AS in hopes that someone can get a good understanding of what i am doing. So here is the code:
t1.onRelease = function() {
infoField._visible = true;
startLoading("cc11.swf");
};
t2.onRelease = function() {
infoField._visible = true;
startLoading("cc11.swf");
};
t3.onRelease = function() {
infoField._visible = true;
startLoading("picture3.jpg");
};
function startLoading(whichImage) {
loadMovie(whichImage, "imageLoader");
_root.onEnterFrame = function() {
infoLoaded = imageLoader.getBytesLoaded();
infoTotal = imageLoader.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible = false;
}
};
}
I have a parent swf which has buttons named t1, t2, and t3. These buttons call upon external child swf files to play on top of my parent swf. I have an empty MC w/ an instance name of imageLoader that is my place holder for the child swf files. Also I have a preloader on the parent swf that plays before the child is loaded. The instance name for the preloader is called infoField. I am using a preloader because the child swf files are large. As of now the only AS i have in the child swf is a stop at the end. I need to create a "close" button inside the child swf file. This button is to only be visible on the child swf file. And basically it needs to "close", "delete", or "remove" the child swf playing on top of the parent swf so I can view the parent swf again. Do I need to change my code around on the parent? Any help is greatly appreciated.