Reputation: 53
So I'm using easeljs and I have a bunch of images i'm going to recycle. For some reason whenever I try to add them to the stage stage.update() no longer works. (I used an alert to test this so it could just be going really slow like 2 hours to load slow).
I'm not sure what's going on. It's not the stage or that the images aren't loaded. Any ideas? **edited ` //variables var $canvas = $("canvas"); //to call the canvas var stage = new createjs.Stage("c"); var queue = new createjs.LoadQueue(); var n = 10; //it will be a 10x10 board var cw = 50;//each cell will be 50px wide var x, y; var moves = 0; var rows = []; //will be an array of arrays var pieces = []; //will be the image array of arrays
//preloadjs images
//queue.installPlugin(stage); //don't think i need this
queue.on("complete", handleComplete, this);
queue.loadManifest([
{id:"imgA", src:'DNA/a.png'},
{id:"imgC", src:'DNA/c.png'},
{id:"imgG", src:'DNA/g.png'},
{id:"imgT", src:'DNA/t.png'},
{id:"imgX", src:'DNA/x.png'}
]);
function handleComplete(){
var image = queue.getResult("imgA");
var pic = new createjs.Bitmap(image);
pic.y = 5;
pic.x = 5;
stage.addChild(pic);
stage.update();
}
**still not working and I have added preloadJS to my collection of libraries
Everything is sourced correctly, but it's still not working? I have the stage declared and it says that it's not crashing so i'm not sure what the problem is?
Upvotes: 2
Views: 729
Reputation: 1315
The text is being draw?
Some other notes:
Upvotes: 1