Quantcast
Channel: hello world » actionscript
Viewing all articles
Browse latest Browse all 5

액션스크립트 3.0 / 버튼 액션

$
0
0

AS 2.0에서는 버튼에 직접 액션을 넣는다.

on(press) {
	trace("button pressed");
}

AS 3.0에서는 버튼에 직접 액션을 넣을 수 없다. 대신 버튼에 이름을 주고 액션과 연결해야 한다.

stop();

bt.addEventListener(MouseEvent.CLICK, btnClick );

function btnClick(event:MouseEvent) { 
	trace("button pressed"); 
}

Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles