我有两个影片剪辑,一个影片剪辑垂直拖动,另一个拖动水平。如果我滑动水平动画剪辑,我希望垂直动画剪辑也垂直拖动(如菜单)。我已经通过将两个拖动功能放在一个拖动功能中来尝试过这个,但它没有用。谁能帮帮我?
menu0.bar1.thumbnail1.addEventListener(MouseEvent.MOUSE_DOWN, startdrag1)
stage.addEventListener(MouseEvent.MOUSE_UP, stopdrag1)
function startdrag1 (e:MouseEvent)
{
menu0.addEventListener(MouseEvent.MOUSE_DOWN, startdrag)
menu0.removeEventListener(MouseEvent.MOUSE_DOWN, startdrag)
//Horizontal dragging menu
menu0.bar1.thumbnail1.startDrag(false, new Rectangle(0,125,-1380,0));
//Vertical dragging menu
menu0.startDrag(false,new Rectangle(0,93,0,-1125));
}
function stopdrag1 (e:MouseEvent)
{
menu0.bar1.thumbnail1.stopDrag();
menu0.addEventListener(MouseEvent.MOUSE_DOWN, startdrag)
menu0.bar1.stopDrag();
}
它只会水平拖动,但菜单不会拖动。(缩略图在菜单中,脚本在它之外)