Forum Moderators: open

Message Too Old, No Replies

Help With Code

         

emanuele

2:42 am on Mar 9, 2007 (gmt 0)

10+ Year Member



Need help with this code....can someone tell me what the code does?

Thanks

onClipEvent(load){
speedX = -10;
speedY = -10;
stageWidth = Stage.width;
stageHeight = Stage.height;
}

onClipEvent(enterFrame){
_x+=speedX;
_y+=speedY;
if(_root.paddle.hitTest(this)){
speedX = Math.abs(speedX);
}
if(_y<_width/2){
speedY = Math.abs(speedY);
}
if(_y>(stageHeight-(_width/2))){
speedY = -10;
}
if(_x>(stageWidth-(_width/2))){
speedX = -10;
}
if(_x<_width/2){
trace("YOU LOSE");
}
}