I’ve got a game that I’ve been working on and it requires points to be made so that a ship can go to those points on a path that a player has drawn. Basically the player will draw a path and the ship will follow the points that will be added every half second
I need help with the Timer/TimerEvent classes. I want a point every half millisecond.
my code.
var s:Shape = new Shape();
addChild(s);
var timer : Timer = new Timer (500);
s.addEventListener (TimerEvent.TIMER, timerHandler);
timer.start ();
function timerHandler (event : TimerEvent) : void
{
var p:Point=new Point(mouseX,mouseY)
}
I haven’t ever used the timers in as3 so my experience is limited. Any help is appreaciated.