You can see trace statements in the output window within Flash. You can also use a debugger for this however what if you can't install them or have no access to get them?
Here's an option... tracing on stage. Create a text field and trace to the stage. I hope this is a good alternative to people who wouldn't want to install anything else.
I may place this on the stage in an area that doesn't interfere with the movie just to make sure the functions are being called.
I called the movieClip traceField.
within my function along with my trace statement:
trace("Tracing init function)";
I also add
traceField.text = "Tracing init function to stage";
That's it. Seems to make my workflow easier.
stop();
init();
function init():void{
//Call trace statements
trace ("Init function has been called");
traceField.text = "Init function has been called";
var cbtn:MovieClip = new clickbtn();
cbtn.x = 140;
cbtn.y = 140;
addChild(cbtn);
cbtn.buttonMode = true;
cbtn.addEventListener(MouseEvent.CLICK, btnClick);
cbtn.addEventListener(MouseEvent.ROLL_OVER, btnRollOver);
cbtn.addEventListener(MouseEvent.ROLL_OUT, btnRollOut);
}
function btnClick(e:MouseEvent):void{
//Call trace statements
trace("Button has been Clicked");
traceField.text = "Button has been Clicked";
}
function btnRollOver(e:MouseEvent):void{
//Call trace statements
trace("Button rolled over");
traceField.text = "Button rolled over";
}
function btnRollOut(e:MouseEvent):void{
//Call trace statements
trace("Button rolled out");
traceField.text = "Button rolled out";
}
+