开发者

Flash ActionScript 2.0 problem with the object's _visible parameter

Hey guys, I've been trying to build something simple in Flash 8, and I stumbled across something weird I cannot explain:

I have an object, and at some point of the program, I want it to be visible (it is invisible at first), so I write:

_root.myObj._visible = true;
_root.gameOver.swapDepths(_root.getNextHighestDepth()); //so it will be on the top

and this works fine, the object becomes visible and etc.

What I planned to happen next is that the user presses a button on that same object, and the object will go invisible:

on(release)
开发者_C百科{
 trace(_root.myObj._visible);
 _root.myObj._visible = false;
 trace(_root.myObj._visible);
 _root.gotoAndPlay("three");
}

The trace returns at first true and later on false, so the command works, but oddly the object stays visible, that's what I don't understand.

Thanks everybody in advance.


You could also put _root.myObj._visible = false; on the frame with your label of "three"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜