I just started trying to use EaselJS, and I'm following the tutorials that I have found online. As far as I can tell, I have copied the code exactly, and all works fine until I add the "addEventListener" function command. After that I get a blank canvas. No errors in the console either. (BTW I have jQuery loaded also, but the problems were there before I added jQuery, so there shouldn't be any conflict between the two libraries)
Here is my code:
<script src="js/easeljs.js"></script>
<script>
$(document).ready(function(){
window.canvas = document.getElementById("myCanvas");
stage = new createjs.Stage(canvas);
shape = new createjs.Shape();
shape.graphics.f("purple").r(50,50,100,100);
stage.addChild(shape);
createjs.Ticker.setFPS(30);
createjs.Ticker.addEventListener(function(){
shape.rotation += 8;
stage.update();
});
});
</script>
I was just wondering if there is some other preparation, or libraries that I need to be linking to that is causing the animation to fail. I have tried multiple tutorials, and they all seem to fail when the addEventListener, or eventListener commands are used. I've also had some fail when the ticker is initiated. CreateJS is supposedly a really good engine for creating JavaScript games, but so far it's not working at all, so any advice to make it function properly would be awesome. Thank you in advance.