Can't get _visible to work

I have two background bitmaps turned into movieclips (Background1, Background2)

They are on 2 seperate layers. I then have a buttons with this code:

on(release) {
Background2._visible = false;
}

Why doesn’t Background2 hide, so I can see Background1 on the layer beneath?

I even tried giving Background2 the instance name Backg2 and changing the code to:
on(release) {
Backg2._visible = false;
}

Neither works. What am I overlooking?

Thanks

RR

Just a suggestion. I usually have a dynamic text field on the main stage named _root.warn and I use it to output what should be obvious, to make sure I’m not missing a typo or relative link.

_root.warn = Backgrnd2._visible.

This should at least tell you if you’re working with the right movir clip and referring to it properly.

You might also try:

_root.Background2._visible=0

and

_root.Background2._visible=1

Watch your caps and lowercase, too.

*Originally posted by 3dron *
I even tried giving Background2 the instance name Backg2 and changing the code to:
on(release) {
Backg2._visible = false;
}

This is exactly what you have to do ! It works, and if it doesn’t, you can try and put _root.Backg2._visible = 0, but it should work as is.

pom :asian:

try putting the false as 0 and true as 1, it works for me!!