I got it playing with the Wii, so it should be tested elsewhere too...
this.pressedDelegate = Delegate.create(this, buttonPressed);
Wii.getRemote(0).addEventListener("buttondown", this.pressedDelegate);
private function buttonPressed(event:Object):Void {
_root.gotoAndPlay("new_game");
}
at this time, onUnload isn't called...very annoying since I usualy clean my listeners here !
To be more precise:
A SWF calls a function of my SWF via LocalConnection
this function callbacks the listener added
the listener calls gotoAndPlay
so it's perhaps because it's in the LocalConnection chain or because of Delegate ?
No comments:
Post a Comment