You need to set the position to “absolute” and then set the top and left properties. DOMElement simply sets up the conversion of the object.
Here is a quick example using Tween to animate a form.
http://jsfiddle.net/TeVZ6/
var stage = new createjs.Stage("canvas");
var html = document.createElement('div');
html.id = 'ab';
html.style.height = '50px';
html.style.width = '100px';
html.style.backgroundColor = '#000000';
html.style.position = "absolute";
html.style.top = 0;
html.style.left = 0;
document.body.appendChild(html);
var gg = new createjs.DOMElement(html);
gg.x = 20;
gg.y = 20;
stage.addChild(gg);
stage.update();
createjs.Tween.get(gg).to({x:400}, 1000);
createjs.Ticker.addEventListener("tick", stage);
Lanny source
share