Here’s my code
package
{
import flash.display.MovieClip;
import flash.events.*;
import flash.utils.Timer;
public class Game extends MovieClip
{
public var ship:Ship = new Ship;
public var gameTimer:Timer;
public function Game()
{
gameTimer=new Timer(25);
gameTimer.addEventListener(TimerEvent.TIMER,onTick);
gameTimer.start();
trace ("game on line");
addChild(ship);
}
public function onTick(timerEvent:TimerEvent):void
{
trace("onTick")
moveTheShip(); [U]//I also Tried “ship.moveTheShip();”[/U]
}
}
}
and…
package
{
import flash.display.MovieClip;
import flash.events.*;
import flash.ui.Keyboard;
import flash.utils.Timer;
import game;
public class Ship extends MovieClip
{
public function Ship()
{
trace("ship checking in");
function moveTheShip():void
{
trace("soFarSoGood");
}
}
}
}
it seems simple enough but I’m getting
1180: Call to a possibly undefined method moveTheShip.
What the… can someone help
Cheers,
The Noooooest Nooob In Noooobland