Why won't this ENTER_FRAME event stop firing when I call view_stats_exit before going to view_start?
public function view_start (e:MouseEvent):void
{
gotoAndStop("start");
}
public function view_stats(e:MouseEvent):void
{
// Event
StatsUI.addEventListener(Event.ENTER_FRAME,stats_scroll);
}
public function view_stats_exit (e:MouseEvent):void
{
StatsUI.removeEventListener(Event.ENTER_FRAME,stats_scroll);
view_start(null);
}
TypeError: Error #1009: Cannot access a property or method of a null object reference. at Snapshot/stats_scroll()