package { import flash.display.*; import flash.events.*; public class actionscript_events_Console extends Sprite { // Constructor public function actionscript_events_Console () { var game:actionscript_events_Game = new actionscript_events_Game(); game.addEventListener(actionscript_events_Game.GAME_OVER, gameOverListener); } private function gameOverListener (e:Event):void { trace("The game has ended!"); // Display "back to console" UI (code not shown) } } }