Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : Visibility Variable


N Rohler
3/30/2004 6:40:09 PM
on (release) {
_parent.my_mc._visible = false;
}


[quoted text, click to view]
visible.

Bnuessler86
3/30/2004 11:28:13 PM
How do i make it so that...
David Stiller
3/31/2004 9:16:20 AM
[quoted text, click to view]

The above is true if the button is contained within the clip it means to
set invisible. Of course, once the clip is invisible, there's no setting it
back, since the clip (and the button it contains) are no longer to be seen.

In principle, the button simply has to switch the _visible property of a
given movie clip. You can path to any movie clip you like. If three movie
clips have instance names of Kermit, Fozzy, and Gonzo -- and if they're all
sitting on the main timeline -- you could have a button that turns them all
off with the code ...

on (release) {
Kermit._visible = false;
Fozzy._visible = false;
Gonze._visible = false;
}

.... and another button that turns them all back on again ...

on (release) {
Kermit._visible = true;
Fozzy._visible = true;
Gonze._visible = true;
}

.... or a button that turns them off when they're on, and on when they're off
....

on (release) {
if (Kermit._visible == true) {
Kermit._visible = false;
Fozzy._visible = false;
Gonze._visible = false;
} else {
Kermit._visible = true;
Fozzy._visible = true;
Gonze._visible = true;
}
}

.... this last example assumes they're all going to be on or off at the same
time.


David
stiller ( at ) quip ( dot ) net

[quoted text, click to view]

AddThis Social Bookmark Button