mc.onEnterFrame = function(){
this._x += ( 400 - this._x)/ 8;//等加速率移動
//this._x = (this._x+1);這樣寫就是_x不停的一直+1
trace(mc._x)//看x值的變化
if(this._x > 400){
delete this.onEnterFrame;
}//如果x值大於99,關閉enterframe,於是mc就停了
};
//if( ){ }else{ } 判定試
No comments:
Post a Comment