기본적으로, 나는 당신이 뭔가를 끌고있는 것 같지 않습니다. 언론, 이동 및 석방의 순서가 있습니다. 당신은 무언가를 클릭해야 할 것입니다, 나는 당신이 타임 라인 자체의 언론 사건을 고려할 수 있다고 확신합니다. 같은 것이있을거야 뭔가 : 선택 그래픽 자체에 대한
timeline.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
timeline.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
// the next line just considers that leaving the object surface is the same as depressing the mouse button
timeline.addEventListener(MouseEvent.MOUSE_OUT, onMouseUp);
function onMouseDown(evt:MouseEvent):void {
// add the event listener for the mouse move action
timeline.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
// create the movie clip for the box
// you get the mouse coordinates from evt.localX and evt.localY (relative to the origin of the timeline movieclip) or evt.stageX and evt.stageY (as global values)
}
function onMouseMove(evt:MouseEvent):void {
// adjust the selection width and height
// you get the mouse coordinates from evt.localX and evt.localY (relative to the origin of the timeline movieclip) or evt.stageX and evt.stageY (as global values)
}
function onMouseUp(evt:MouseEvent):void {
// remove the event listener for the mouse move, that means that the function onMouseMove will no longer be called
timeline.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
// brush up and send the final coordinates of the selection to the next function
}
, 당신은 라이브러리에서 동영상 클립의 인스턴스를 사용할 수 있습니다, 또는 당신은 단순히 빈 무비 클립을 만들 수는 반투명하고 그릴 수 그 안에있는 사각형 :
var selection:MovieClip = new MovieClip();
selection.alpha = 0.5;
selection.graphics.beginFill(0x000000);
selection.graphics.drawRect(x,y,width,height);
selection.graphics.endFill();
this.addChild(selection);