lvovand, pressmove - работает только при удерживании и перемещение. Pressup тоже не работает.
Вот код, примерный:
Код
left = new Button("<<","#E80000 ");
left.x = 20; left.y = 10;
right = new Button(">>","#E80000 ");
right.x = 300; right.y = 10;
up = new Button("^","#E80000 ");
up.x = 20; up.y = 60;
stage.addChild(left);
stage.addChild(right);
stage.addChild(up);
player = new createjs.Shape();
player.graphics.beginFill("#ff0000").drawRect(0, 0, 100, 100);
stage.addChild(player);
left.addEventListener("pressup", leftm );
right.addEventListener("pressup", rightm );
}
function leftm(event)
{
player.x = player.x - 2;
}
function rightm(event)
{
player.x = player.x +2;
}