;

PDA

Click to See Complete Forum and Search --> : Loaded Movie Problems


xbaggypants
03-02-2007, 11:51 AM
http://www.worldwebtechnologies.com/new/images/flash.gif

Hi,

I have a big problem, I have a movie which image "2" is on. When I click a button I load movie "1" onto the stage. My problem is that the "2" image is a button (which loads another movie) and once I load the "1" image the actions on the "2" image are active. How can I turn off the actions of this button once movies are loaded on top of it?

Thanks in Advance!

Ryan

nunomira
03-02-2007, 12:15 PM
hi xbaggypants,

Welcome to FlasKit.

If you want to disable the button after clicking it, you can use the enabled (http://livedocs.macromedia.com/flash/8/main/00001988.html) property.

my_btn.onRelease = function()
{
this.enabled = false;
// load the external file
// do what you want...
};

xbaggypants
03-02-2007, 12:25 PM
I just tried it, does this work if the movies are on different levels?

nunomira
03-02-2007, 12:37 PM
Disabling a button using the enabled property works as long as the button exists at the time you trigger the code and you specify the correct target path (http://www.nunomira.com/tutorials/understanding_target_paths.php).