Ciao.
Con questo codice ottengo
il movimento del MC fino al bordo
destro.
se invece di fermarlo a rightLimitCodice PHP:
var SPEED:Number = 5;
var center:Number= Stage.width/2;
var rightLimit:Number = Stage.width-ball_mc._width/2;
ball_mc._x= center;
ball_mc.onEnterFrame = function(){
this._x += SPEED;
if (this._x>rightLimit) {
this._x = rightLimit;
}
}
volessi farlo ritornare al punto di partenza con
la stessa velocità come potrei fare![]()
![]()