ここではUIコンポーネントの使用方法を説明します。使用方法を学習する前にUIコンポーネントの基礎について理解している必要があります。まだの方はUIコンポーネントの基礎についてを参照してください。
function myFunc(event:MouseEvent):void { trace("click"); } myButton.addEventListener(MouseEvent.CLICK,myFunc);
import fl.controls.Button; var myButton:Button = new Button(); addChild(myButton); function myFunc(event:MouseEvent):void { trace("click"); } myButton.addEventListener(MouseEvent.CLICK,myFunc);