Hiding and Unhiding Movie Clips on Command Using _visible and !
Wednesday October 18, 2006
No, ! isn't the overenthusiastic punctuation to this blog's title. Instead we're referring to a logical NOT (yes, it's really customary to type it in all caps), a term used to refer to an operator in a logical function that, when placed in front of a variable or function, takes the value of that variable (or the value returned by the function) and turns it into its opposite. Confused? Look at it this way: true=true, but !true=false. If it isn't true, then it's false, so NOTtrue/!true=false. ! has turned true into its opposite.
ActionScripting Basics: "On" Command Options
ActionScripting Basics: Using setProperty
Related Lessons:


Comments
Thanks for making this tutorial (and your halloween dress-up one) as they’re exactly what I’m looking for to finish my Pirate dress-up game! =D
Glad to be of service, Azurice.
I’m new on flash and it’s a nice tut. but there’s a small error on the displayed code there’s a missing point there:
code on site is:
on (release) {
_root.pinkgirl._visible = !_root.pinkgirl_visible;
}
but it should be:
on (release) {
_root.pinkgirl._visible = !_root.pinkgirl._visible;
}
see? really small error it took me a while to realize that