PDA

View Full Version : invisibility


stephenF
10-27-2001, 01:10 AM
In the movie I'm working on, I've made a button (embedded in a movie clip) dissappear using this code:

setProperty ("_level0/instancename", _visible, false);

I thought that if I put this in frame 1 of the movie, that when "instancename" comes along later in the movie, it would be made invisible. Now I find, though, that it will only work if the above code sits above (ie at the same frame number) as the movieclip. Is this how it's supposed to work?

Jesse
10-27-2001, 02:02 AM
errg I don't really get you. Setting an object invisible will be effective for the remainer of the movie or until you set it visible again...
also note that if the button is IN an MC that you want to hide, you can use this code:
on (release) {
this._visible = false;
}
bit easier :)

stephenF
10-27-2001, 02:30 AM
That's what I thought. Clearly I'm doing something wrong - maybe I've got a different version of Flash to everybody else... ;:0)
What I'm doing is, I've put a button that only has a hit state ( so you can't see it) behind a dynamic text field. In my "actions" row in the timeline, I've got this code:
if (String(text6) == "") {
setProperty ("text6movbut", _visible, false);
}
This only works when it's "parallel with the MC in the timeline.

stephenF
10-27-2001, 06:48 AM
Turns out that in:

(String(text6) == "") {
setProperty ("text6movbut", _visible, false);
}

I should have been using "eq" instead of == , in order to export to flash 4. Doing this has fixed it, and other problems I was having with buttons in movieclips.