我有以下代码:
if(pickedUp == true){
trace("released and picked up" + pickedUpNum);
this.storedClick = false;
this.onMouseMove = null;
this.onMouseDown = null;
this.onMouseUp = null;
this.onEnterFrame = this.refresh;
pickedUpNum++;
if( pickedUpNum > 60) pickedUp = false;
}
if(pickedUp == false){
trace("released and not picked up");
this.storedClick = false;
this.onEnterFrame = this.refresh;
this.onMouseDown = this.onStoreDrag;
this.onMouseUp = this.onClearStoreDrag;
this.onMouseMove = null;
}
我得到这个输出大约 60:
released and picked up59
released and picked up60
released and not picked up
released and picked up61
released and not picked up
这怎么可能?我一定错过了一些简单的东西。
我正在进行的项目实际上是在尝试模拟拿起一张纸并移动它,然后将其放回原处。我正在尝试修改 Flash 页面翻转代码以创建此效果。