as3拖拽事件

jx1.addEventListener(MouseEvent.MOUSE_DOWN,MouseEventHandle3);
function  MouseEventHandle3 (e:MouseEvent):void {
 jx1.startDrag();
}


jx1.addEventListener(MouseEvent.MOUSE_UP,MouseEventHandle7);
function  MouseEventHandle7 (e:MouseEvent):void {
 jx1.stopDrag();
 //存数据
var myObjA = {}; //以对象对存储对象
myObjA.xx = jx1.x;
myObjA.yy = jx1.y; 
myLSO2.data.myObjA = myObjA;

你可能感兴趣的:(AS3)