TypeError: Error #1009: Не удается вызвать свойство или метод со ссылкой на объект "null".
at code.amoebaclasses::Ship/live()
at code.amoebaclasses::InteractiveLayer/live()
at code::Game2()
Вот мои коды скажите пожалуйста как вызвать функцию Added to stage
Это вот отсюда at code.amoebaclasses::Ship/live()

Код AS3:
public function live(ref:*):void
{
// Set game level reference
owner = ref;
// Initialize sounds
thrustSnd = new thrustSound();
// Respond to keyboard presses
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyPressHandler);
stage.addEventListener(KeyboardEvent.KEY_UP,keyReleaseHandler);
// Update screen every frame
addEventListener(Event.ENTER_FRAME,enterFrameHandler);
}
А это отсюда at code.amoebaclasses::InteractiveLayer/live()

Код AS3:
public function live(ref:*):void
{
// Set game level reference
owner = ref;
// Initialize ship
ship.live(this);
// Initialize Amoeba
amoebaCell = new Amoeba();
amoebaCell.live(this,"amoebaCell");
addChild(amoebaCell);
// Initialize sounds
shotSnd = new shootSound();
// Update screen every frame
addEventListener(Event.ENTER_FRAME,enterFrameHandler);
}