backward movement animation in flash with as3
hi, first of let me say that I very new to action scripting and with some tutorial I was able to learn a few things. With that being said, I was charged to make an animation using only action scripting, no motion tween in flash all on one frame. The idea was to move an object along the four corners of the stage. But I have a problem, I figured out how to move the object towards the right and down, but I can't get it to move left and up. here's what I have....and yes I know it's a mess.
import flash.events.Event;
addEventListener(Event.ENTER_FRAME,ballgo)
function ballgo(e:Event):void{
pacmanMc.x += 10;
}
stage.addEventListener(Event.ENTER_FRAME,dontmove);
function dontmove(e:Event):void{
if(pacmanMc.x>500){
pacmanMc.x=500
}
if(pacmanMc.x>490){
pacmanMc.y+=10;
}
}
stage.addEventListener(Event.ENTER_FRAME,freeze);
function freeze(e:Event):void{
if(pacmanMc.y>335){
pacmanMc.y=335
}
}
If anyone could help me before Sunday night it will be greatly appreciated.
