Drag and drop with easeljs in Animate CC 2017

前端 未结 1 987
礼貌的吻别
礼貌的吻别 2021-01-07 03:34

I\'ve been using an HTML Canvas project in Adobe Animate CC 2015.2 to drag around a movieClip on the stage, using the method recommended in the creatjs Mouse Interaction Tut

相关标签:
1条回答
  • 2021-01-07 04:11

    I think I've sorted the problem. The following seems to work on both Animate CC 2015.2 and Animate CC 2017 irrespective of OS and display resolution.

    this.my_mc.on("pressmove", function(evt){
        var p = stage.globalToLocal(evt.stageX, evt.stageY);
        evt.currentTarget.x = p.x;
        evt.currentTarget.y = p.y;
    });
    

    I still have to get my head around why the change was necessary in Animate 2017 and not in Animate CC 2015.2 (scratches head).

    Thanks,

    Dave

    0 讨论(0)
提交回复
热议问题