var jz:d5power.DisplayObject = ui.jz; var kh:d5power.DisplayObject = ui.kh; var fei:d5power.DisplayObject; function xuanz() { jz.rotation += 2; if(fei!=null) kh.y -= 2; if(hit(jz,kh)) { var p = jz.globalToLocal(kh.x,kh.y); kh.rotation -= jz.rotation; kh.x = p.x; kh.y = p.y; jz.addChild(kh); fei = null; } } if(ui.rh==null) { fei = kh; jz.addEventListener(d5power.Event.ENTER_FRAME,xuanz,this); ui.rh = 1; }