[AS 3.0] 이벤트 리스너에 인수 함께 전달하기(2)

오브젝트에 이벤트 리스너를 등록할 때 이벤트외의 인수를 함께 보내는 방법.
그 두번째~

button.addEventListener(MouseEvent.CLICK, function(e:MouseEvent) { handleClickEvent(e, "Home") } );

function handleClickEvent(e:MouseEvent, str:String) {
        trace("Argument :"+str,"- Event target :"+e.target.name);
}
  • Share/Bookmark

0 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2010 blog.flasia.com | powered by WordPress with Barecity