Actionscript 3 设置矩形的最小和最大宽度

Actionscript 3 设置矩形的最小和最大宽度,actionscript-3,prezi,Actionscript 3,Prezi,如何在AS3中设置屏幕宽度值(例如)的范围? 我的意思是我有一段代码: var myBounds:Rectangle=this.getBounds(stage); if ((myBounds.width>650)&&(visibleArea.intersects(myBounds))) { if(this.currentFrame==1) this.play(); } else { this.gotoAndStop(1); } return; 我的

如何在AS3中设置屏幕宽度值(例如)的范围? 我的意思是我有一段代码:

var myBounds:Rectangle=this.getBounds(stage);
if ((myBounds.width>650)&&(visibleArea.intersects(myBounds)))
{

  if(this.currentFrame==1)
     this.play();
}
else
{
    this.gotoAndStop(1);
}
return;
我的电影只有在宽度超过650像素时才开始。 我不知道的是如何设置一系列值,比如: 250
if(stage.loaderInfo.width<650&&stage.loaderInfo.width>250){
play();
}否则{
gotoAndStop(1);
}
您必须按事件或enterframe以某种间隔调用函数。

if(stage.loaderInfo.width<650&&stage.loaderInfo.width>250){
play();
}否则{
gotoAndStop(1);
}

您必须按事件或enterframe以某种间隔调用该函数。

谢谢,我做了我想做的。太棒了。别忘了接受答案,让其他人知道问题已经解决。谢谢你,我做了我想做的。太棒了。别忘了接受答案,让其他人知道问题已经解决。
if (stage.loaderInfo.width < 650 && stage.loaderInfo.width > 250) {
    play();
} else {
    gotoAndStop(1);
}