EaselJS - 上面的对象

时间:2018-02-09 06:09:06

标签: javascript easeljs

我的舞台上有2个物体,我想要一个B物体上方的物体(现在是A上面的B)。

function init() {
    // create stage and point it to the canvas:
    canvas = document.getElementById("testCanvas");
    stage = new createjs.Stage(canvas);

    // enable touch interactions if supported on the current device:
    createjs.Touch.enable(stage);

    // enabled mouse over / out events
    stage.enableMouseOver(10);
    stage.mouseMoveOutside = true; // keep tracking the mouse even when it leaves the canvas

    // load the source image:
    var image = new Image();
    image.src = "ball.png";
    image.onload = handleImageLoad;

    var image2 = new Image();
    image2.src = "open-box.png";
    image2.onload = destination;
}
  • var image = A
  • var image2 = B

0 个答案:

没有答案