import flash.events.Event; //using Math.cos and Math.sin methods and any other variables you may need (xmov, ymov, degrees, radians, speed), //make the ball movie clip move on an angle of your choosing //when the ball collides with one of the four bumpers, make the ball bounce off the wall //you may want to use an Event.ENTER_FRAME event listener to move the ball var degrees:Number; var radians:Number; var xmov:Number; var ymov:Number; var speed:int = 5; stage.addEventListener(Event.ENTER_FRAME, moveBall); speedSlider.addEventListener(Event.CHANGE, changeSpeed); degrees = Math.random() * 360; radians = degrees * Math.PI / 180; xmov = Math.cos(radians); ymov = Math.sin(radians); function changeSpeed(evt:Event):void { speed = speedSlider.value; } function moveBall(evt:Event):void { ball.x += xmov * speed; ball.y += ymov * speed; if (ball.hitTestObject(topBumper) || ball.hitTestObject(bottomBumper)) { ymov *= -1; } if (ball.hitTestObject(leftBumper) || ball.hitTestObject(rightBumper)) { xmov *= -1; } } /*function rotateArrow(evt:MouseEvent):void { xDiff = mouseX - arrowSymbol.x; yDiff = mouseY - arrowSymbol.y; radians = Math.atan2(yDiff, xDiff); degrees = radians * 180 / Math.PI; arrowSymbol.rotation = degrees; dot.x = arrowSymbol.x; dot.y = arrowSymbol.y; } function moveDot(evt:Event):void { dot.x += Math.cos(radians); dot.y += Math.sin(radians); angleAmount.text = String(Math.round(degrees)); xMove.text = String(Math.cos(radians)); yMove.text = String(Math.sin(radians)); } */