ENTER_FRAME Event Listener
Start the moveBall Function
Let's start that moveBall function. Copy and Paste the new statement to your Actions window:
var ball1:ball = new ball();
ball1.x=100;
ball1.y=150;
addChild(ball1);
addEventListener(Event.ENTER_FRAME,moveBall);
function moveBall(event:Event){
Notice that Event matches up in the addEventListener statement and the moveBall arguments:
This follows the same pattern as button events: