1 看过FLASH帮助中的解释后,下面的语句便不难理解:
 2 on (press) { 
 3 this.startDrag(false);//当鼠标在影片剪辑上按下时,开始拖拽。
 4 
 5 on (release) { 
 6 this.stopDrag();//当鼠标释放时,停止对影片剪辑的拖拽。
 7 
 8 ball.onMouseDown = function() {
 9 //当鼠标按下时
10 if (this.hitTest(_xmouse, _ymouse, true)) {
11 this.startDrag(false);//如果影片剪辑与鼠标指针重叠时,开始拖拽 
12 
13 }; 
14 ball.onMouseUp = function() {
15 //当释放鼠标时 this.stopDrag();//停止对影片剪辑的拖拽。
16 }; 

相关文章: