So I have this chicken animated in a movieclip and when I place it on the stage, it just sits there playing the animation but doesn't move around. I just want it to walk around on the stage when the animation is playing. I don't want this to be controlled by arrow keys or anything and I'm using AS3 btw.
package
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
/**
* ...
* @author Vipul Khandelwal
*/
public class demo extends MovieClip
{
private var obj:MovieClip;
public function demo()
{
obj = new MovieClip();
obj.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(e:Event):void
{
// if you want to move x, use this.
obj.x += 5;
// if you want to move y, use this.
obj.y += 5;
}
}
}
North America
Europe, Middle East and Africa
Asia Pacific