Current state of my mouse button release function on my bouncy ball simulator.

function mUp(event:MouseEvent):void
{
ballRest = 0;
ballSmallBounceCount = 0;
mClickVelX = hitPow * percentMBX;
if(mBX > 0){
xVel = 0;
xVel += mClickVelX;
}
if(mBX < 0){
xVel = 0;
xVel -= mClickVelX;
}
if(mBY < 0){
yVel = 0;
mClickVelY = hitPow * percentMBY;
yVel -= mClickVelY;
}
hitPow = 0;
mBDown = false;
}

Leave a comment