3

how do I make below two instance into single one for animation, Code is given below:

 var x = new createjs.Bitmap("img1.png");
 var b = new createjs.Text("A","normal 20px Arial");
 stage.addChild(x,b);
 stage.update();
golyo
  • 517
  • 3
  • 12
asb14690
  • 1,757
  • 3
  • 15
  • 21

1 Answers1

3

Use Containers.

http://createjs.com/Docs/EaselJS/classes/Container.html

var x = new createjs.Bitmap("img1.png");
var b = new createjs.Text("A","normal 20px Arial");
var myContainer = new createjs.Container();
myContainer.addChild(x,b);
stage.addChild(myContainer);
stage.update();
golyo
  • 517
  • 3
  • 12