In my case, make the private function() contain into the package tag is a solution:
確保把 private的function 包在package裡。
Bad code:
package { import flash.display.*; import flash.events.*; public class zoom_picture2 extends MovieClip { private var itemOfNumber:Number = 10; right_btn.addEventListener(MouseEvent.CLICK,onClickbtn); } } private function onClickbtnl(e:MouseEvent):void { trace("hallo"); } |
Good code:
package { import flash.display.*; import flash.events.*; public class zoom_picture2 extends MovieClip { private var itemOfNumber:Number = 10; right_btn.addEventListener(MouseEvent.CLICK,onClickbtn); } private function onClickbtnl(e:MouseEvent):void { trace("hallo"); } } |
No comments :
Post a Comment