createJS:Bitmap


i've been looking @ createjs code working images. im looking bring in image/bitmap library. thought had found code it, nothing. compiles, gives me nothing. here code, there reason why isn't working (the circle first test, , kept check code compiled without error.)

can bring image in way? if not how?

     

 

var circle = new createjs.shape();

circle.graphics.beginfill("deepskyblue").drawcircle(0, 0, 50);

circle.x = 100;

circle.y = 100;

stage.addchild(circle);

 

createjs.tween.get(circle, { loop: false })

  .to({ x: 200 }, 1000, createjs.ease.getpowout(12))

 

//createjs.tween.get(this.square_mc, { loop: true})

// .to({ x: 300 }, 3000, createjs.ease.getpowinout(12));

 

var image = new createjs.bitmap("sandies pic9.png"); //in library

var mc_container = new createjs.container();

mc_container.addchild(image);

mc_container.x=100;

stage.addchild(mc_container);

stage.update();

that's loading bitmaps.

 

to use library bitmap, assign linkage id (eg, sandies_pic9) , use:

 

var image=new lib.sandies_pic9;



More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop