[英]Animate / Flash CC, AS3. Want to toggle button.upState on and off
I'm working on a school project right now. 我正在做一个学校项目。 I've searched far and wide and haven't found a solution. 我搜索得很远,但没有找到解决方案。
I have 2 simpleButtons
. 我有2个simpleButtons
。 One is named btOui
, the other btNon
. 一个名为btOui
,另一个btNon
。 I was looking for a way to make btOui
's downState be false
when btNon
's downState is true
, and vice versa. 当btNon
的downState为true
,我正在寻找一种让btOui
的downState变为false
的方法,反之亦然。 I was using : 我用的是:
btNon.upState = btNon.downState;
// And //而且
btNon.upState = btNon.upState;
But my understanding is that btNon
's upState
gets overridden by its downState
. 但我的理解是btNon
的upState
被downState
覆盖了。 In a way, btNon
's upState
is now a copy of its downState
, so I can never get its original upState
again. 在某种程度上, btNon
的upState
现在是它的downState
的副本,所以我永远不能再获得它的原始upState
。
I hope I'm being clear. 我希望我很清楚。 I'm not particularly in a hurry, but any answer is appreciated ! 我并不是特别匆忙,但任何答案都表示赞赏!
Try the following program 请尝试以下程序
if(btNon.upState)
{
btNon.downState = false;
}
else
{
btNon.downState = true;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.