Upgrading to latest Createjs version from May 2013 version -
this standard boiler plate using:
var stage = new createjs.stage("canvas1"); createjs.ticker.addeventlistener("tick",stage); stage.enablemouseover(); ... createjs.ticker.setfps(12); createjs.ticker.addlistener(stage,false);
apparently createjs.ticker.addlistener no longer supported. how should above code changed?
your example shows both correct , deprecated usage.
// old createjs.ticker.addlistener(stage,false); // new createjs.ticker.addeventlistener("tick", stage);
the changes make ticker use same event dispatcher pattern rest of createjs does.
additionally, framerate method has changed setter:
// old createjs.ticker.setfps(12); // new createjs.ticker.framerate = 12;
it depend on version use of easeljs. updated demo posted latest version using changes: http://jsfiddle.net/lannymcnie/aprdf/80/
unfortunately there still demos out there out-of-date code. let me know if have other questions.
Comments
Post a Comment