控件拖动的实现
感觉稍稍还算不错的方法:
import mx.core.UIComponent;
private function appStartMove(event:Event):void
{
var component:UIComponent=event.currentTarget as UIComponent
component.startDrag();
}
private function appStopMove(event:Event):void
{
var component:UIComponent=event.currentTarget as UIComponent
component.stopDrag();
}
控件:
<mx:Panel width="250" height="200" layout="absolute" x="365" y="10" mouseDown="appStartMove(event)" mouseUp="appStopMove(event)" id="Hello" title="Hello"> </mx:Panel>


浙公网安备 33010602011771号