Web Hosting Deals Holiday Logo Design Website Header Templates Register domain Search Engine Optimisation Web Hosting
Go Back   Talk Mania Forum > Flash and ActionScript

Flash and ActionScript General Flash/ActionScript help, tips, tricks and stumbling points can be posted and answered here!

 Image
Buy Sell Downloads

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-14-2007, 05:03 AM
Junior Member
 
Join Date: Feb 2007
Posts: 1
bloombloom is on a distinguished road
Please Help w/ a "close" button on child swf

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.

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +2. The time now is 07:39 AM.



Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC8
Forums Copyright © Talk-Mania.com