class T_globalToLocal extends egret . DisplayObjectContainer { /**
    * 演示本地坐标和舞台坐标的转换
    */ public constructor ( ) { super ( ) ; var container = new egret . DisplayObjectContainer ( ) ; container . x = 200 ; container . y = 200 ; this . addChild ( container ) ; var circle = new egret . Shape ( ) ; circle . graphics . beginFill ( 0xff0000 ) ; circle . graphics . drawCircle ( 25 , 25 , 25 ) ; circle . graphics . endFill ( ) ; container . addChild ( circle ) ; circle . touchEnabled = true ; circle . addEventListener ( egret . TouchEvent . TOUCH_TAP , onClick , this ) ; function onClick ( ) { var targetPoint = container . globalToLocal ( 0 , 0 ) ; circle . x = targetPoint . x ; circle . y = targetPoint . y ; } } }