鼠标键盘对场景或者场景中MC分别加以监听收录(as3.0)
2009年3月13日
没有评论
来源:taoshaw.com 作者:taoshaw.com
对场景中舞台跟MC分别添加鼠标监听:
1 2 3 4 5 6 7 8 9 10 11 12 13 | function testit (e:MouseEvent):void { switch (e.target) { case my_text : trace ("you click my_text!"); break; case stage : trace ("you clicked stage!"); break; } } stage.addEventListener (MouseEvent.CLICK,testit); |
一般MC的键盘ENTER键监听:
阅读全文…
