PDA

View Full Version : Button nested in Movie


____
11-15-2002, 10:06 PM
I have a draggable MC with a button nested within it. The button has the following action attached. on (release) {setProperty (_root/main, _visible, false);

}

When nested in the movie this button does not work. If I use the same button and actions placed outside of the movie, it works. What gives?
Note: It is probably something simple, or the fact that I just dont know what I'm doing fully that gives. ;)
Thanks,
Eric

____
11-15-2002, 10:10 PM
Note that the movie Clip it is nested in does have a drag/drop action on it.

____
11-15-2002, 10:28 PM
Ah, I think I fixed it. I converted the inside of the movie to a button, and added the drag/stop drag actions to the button. I then nested the setProperty button within the movie button. And it now works. I can drag the outer box, and make it dissapear by clicking the button. Can anyone explain this in more depth, I think I have it but I'm not quite sure.

Ricod
11-17-2002, 08:24 AM
Well, I don't know about the rest of your code, but on(release) is a button specific action. Should give you a warning when you publish, though ...

anyway, I did see you're using Flash 4 syntax, but the _root thingie gives away that you're using 5 or Mx. Dot syntax is preferred :
_root.Main._visible = false;
It does the same, but is shorter, and in time will be more readable.

farafiro
11-17-2002, 09:35 AM
just stopped to say "What a name, I like it"