2010-02-24 01:11:14 +00:00
|
|
|
package me
|
|
|
|
{
|
2010-02-25 01:20:19 +00:00
|
|
|
//namespace me = "me.*";
|
2010-02-24 01:11:14 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|