Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash 8 Button Help Please!!

Status
Not open for further replies.

crayola86

Programmer
Jan 26, 2009
5
Hello,

I am creating a pop up dialog box within a movie clip which is activated by a button. I have managed to get the pop up box to open when the button is clicked. But after I close the pop up box and attempt to click the button again the pop up box does not re appear. In other words the button only works once. I have made sure both my button and mc have instance names, so I dont know where I am going wrong.

The code attached to the button is as follows:

on (release) {
castle_btn.loadMovie("popup_mc");
}


and the close button code within the movie clip is:

on (release) {
unloadMovie(this);
}

Both of these codes are working successfully, I am just wondering if anyone could enlighten me as to how I can refresh/reload the button so it works again

Thanks in advance : )
 
Hi,

I do I upload a link as it isnt currently on the web it is just saved on my desktop and I can only paste URL attachments.

Sorry to be a pain


 
I have a zip file of my flash but not sure if I am able to upload this or not
 
What you're doing is unloading, in fact removing the movie clip from the stage. It cannot thus be made visible again, since it's no longer there...

Make it invisible instead...

on (release) {
//unloadMovie(this);
this._visible = false;
}

Oh and the other code on the castle_btn itself is useless...

on (release) {
//castle_btn.loadMovie("popup_mc");
}

It's this code that makes it visible...

_root.popup_mc._visible= false;
_root.castle_btn.onRelease = function()
{
_root.popup_mc._visible= true;
}


Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
ah right I see.

I have manipulated the code and it works, brilliant.

Thankyou for your help : )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top