You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an initialize function that loads two graphic files. A grid bitmap image and a bird.
From how we staggered the functions, the grid should load first and then the bird graphic on top. We even put the loadBirdGraphic inside the loadGridGraphic and updated the stage accordingly.
As it currently runs, the bird does not load at all every couple of reloads and we don't know where the issue lies.
Code Snippet:
function loadGridGraphics() {
background = new createjs.Bitmap(backgroundImage);
stage.addChild(background);
setTimeout(stage.update(), 50);
loadBirdGraphics();
stage.update();
}
function loadBirdGraphics() {
bird = new createjs.Bitmap(birdImage);
bird.x = startRow;
bird.y = startCol;
stage.addChild(bird);
stage.update();
}
We call loadGridGraphics at some point after the DOM has loaded.
The text was updated successfully, but these errors were encountered:
We have an initialize function that loads two graphic files. A grid bitmap image and a bird.
From how we staggered the functions, the grid should load first and then the bird graphic on top. We even put the loadBirdGraphic inside the loadGridGraphic and updated the stage accordingly.
As it currently runs, the bird does not load at all every couple of reloads and we don't know where the issue lies.
Code Snippet:
function loadGridGraphics() {
background = new createjs.Bitmap(backgroundImage);
stage.addChild(background);
setTimeout(stage.update(), 50);
loadBirdGraphics();
stage.update();
}
function loadBirdGraphics() {
bird = new createjs.Bitmap(birdImage);
bird.x = startRow;
bird.y = startCol;
stage.addChild(bird);
stage.update();
}
We call loadGridGraphics at some point after the DOM has loaded.
The text was updated successfully, but these errors were encountered: