zoukankan      html  css  js  c++  java
  • flash中实现拖拽

     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 }; 
  • 相关阅读:
    数据库
    数据库
    数据库
    数据库
    数据库
    数据库
    windows
    LeetCode : Word Pattern
    LeetCode : Perfect Number
    LeetCode : Minimum Depth of Binary Tree
  • 原文地址:https://www.cnblogs.com/somesongs/p/1382911.html
Copyright © 2011-2022 走看看