【问题标题】:Flash 8 ActionScript - Movie Clip locationFlash 8 ActionScript - 影片剪辑位置
【发布时间】:2012-06-07 23:40:14
【问题描述】:

在 Flash 8 中,我创建了一个影片剪辑。在里面我又添加了 3 个符号(电影剪辑)。 1个盒子和两个图像,目标是拖放盒子中的rigt图像。我该怎么做?

on(press) {
startDrag("_root.FirstMC.RObject");
}

on(release) {
stopDrag();
if (_root.FirstMC.RObject._droptarget == "/Box") {
    gotoAndStop(3);
    }
}

我做错了什么?我可以拖放,但它无法识别放置位置(不会转到第 3 帧)。有什么帮助吗?

【问题讨论】:

    标签: flash actionscript drag-and-drop movieclip


    【解决方案1】:

    使用 hitTest,例如

    onClipEvent (enterFrame){
        if (yourMC.hitTest(yourImage))
        {
            what is supposed to happen here...
    
        }
    
    }
    

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2011-11-02
      • 2014-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-19
      • 2012-02-04
      • 1970-01-01
      • 2020-01-09
      相关资源
      最近更新 更多