AS3 - Trace - Click button

寵の児 提交于 2019-12-06 15:18:10

trace("1"); will go to the output panel it is intended for debugging.

If you want to see something on the stage, you will need to create a TextField and set it's text property to whatever you want.

button1.addEventListener(MouseEvent.CLICK, myClickReaction1);

function myClickReaction1 (e:MouseEvent):void{
    var tf:TextField = new TextField();
    tf.text = "1";
    addChild(tf);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!