USING THE TRACE COMMAND TO DEBUG

by admin on November 8, 2007

///Create a Listener Object
var sUsername:String = ctiUsername.text;
var oListener:Object = new Object();
oListener.click = function(oEvent:Object):Void {
trace(ctiUsername.text);
};
cbtSubmit.addEventListener(”click”, oListener);
var oListener:Object = new Object();
////Assign a click( ) method to the listener object.
oListener.click = function(oEvent:Object):Void {
trace(”The Button was clicked”);
};
///Register the listener object with the button instance
cbtSubmit.addEventListener(”click”, oListener);
btSend.onRelease = function():Void {
trace(”You have clicked the send button”);
};

///Place a button component(Window > Components > UI) In Flash 8 on the stage on Layer 1
///Give it an instance name of cbtSubmit
///Paste the above code into the first frame of your timeline
///Open the output panel and view the trace command telling you
///whenever you click on the button that “The button was clicked”"
///THE TRACE COMMAND WILL HELP YOU DEBUG YOUR CODE!!!!!!!

{ 1 comment… read it below or add one }

IdetrorceNo Gravatar December 16, 2007 at 1:10 am

very interesting, but I don’t agree with you
Idetrorce

Reply

Leave a Comment