package me { //namespace me = "me.*"; import mx.core.Application; import mx.controls.Alert; import mx.controls.Button; import flash.events.Event; import flash.events.MouseEvent; public class DebuggingApp extends Application { public var clickButton:Button; public function DebuggingApp():void { this.addEventListener("creationComplete", initApp); clickButton = new Button(); clickButton.label = "Click Me"; clickButton.addEventListener("click", showAlert); this.addChild(clickButton); } public function showAlert(event:MouseEvent):void { Alert.show('Hello from Flex'); trace("Clickety Click! -> " + event); } public function initApp(event:Event):void { trace("Hello from Flex Debugging!"); var myVar:Number = 9; trace("The value of myVar is " + myVar); } } }