国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦硬件知識(shí) > 鍵盤鼠標(biāo) > Flash代碼如何實(shí)現(xiàn)鼠標(biāo)拖拽效果

    Flash代碼如何實(shí)現(xiàn)鼠標(biāo)拖拽效果

    時(shí)間: 鎮(zhèn)權(quán)965 分享

    Flash代碼如何實(shí)現(xiàn)鼠標(biāo)拖拽效果

      Flash新手入門,鼠標(biāo)不懂操作AS代碼效果。下面學(xué)習(xí)啦小編整理了Flash代碼如何實(shí)現(xiàn)鼠標(biāo)拖拽效果,希望能幫到大家O(∩_∩)O哈哈~

      接下來,我們以母雞下蛋為例子。

      Flash代碼如何實(shí)現(xiàn)鼠標(biāo)拖拽效果

      一、 制作方法:

      1、新建Flash文檔,背景色青色。

      2、新建一個(gè)電影剪輯,命名為MC。第一層插入一個(gè)關(guān)鍵幀,第一幀畫母雞,全居中;第二幀畫蛋,全居中。新一個(gè)層插入一個(gè)空白關(guān)鍵幀,兩個(gè)關(guān)鍵幀都加上幀動(dòng)作stop(); 。

      3、回到主場(chǎng)景,從庫(kù)中把MC拖到舞臺(tái),放在靠左的位置,選中MC,打開“動(dòng)作-電影剪輯”面板,輸入腳本:

      on (press) {

      startDrag(this);

      var newdepth = this._parent.getNextHighestDepth();

      var newname = "copy" + newdepth;

      var prevname = "copy" + (newdepth-1);

      if (this._parent[prevname] == undefined) this._parent[prevname] = this;

      this.duplicateMovieClip(newname,newdepth);

      this._parent[newname]._x = this._parent[prevname]._x + 0;

      this._parent[newname]._y = this._parent[prevname]._y + 0;

      }

      on (release) {

      stopDrag();

    }

      on (dragOut) {

      this.gotoAndStop("2");

      }

      on (releaseOutside) {

      stopDrag();

      }

      4、加上自己喜歡的文字或裝飾,測(cè)試,存盤。

      以上步驟和方法小編真心希望能解決你的問題。

    2151540