javascript - How do I detect a particular child on stage with createjs -
how check if there particular child on stage , how check particular child or b in createjs?
var = new createjs.bitmap('images.a'); var b = new createjs.text('hello','bold 12px arial'); a.settransform(100,100); b.settransform(100,150); stage.addchild(a,b); stage.update();
when create child element, give name child can child @ later stage using getchildbyname('childname') method.
var = new createjs.bitmap('images.a'); var b = new createjs.text('hello','bold 12px arial'); a.settransform(100,100); b.settransform(100,150); a.name = "somenamea"; b.name = "somenameb"; stage.addchild(a,b); stage.update(); stage.getchildbyname("somenamea");
this assuming child added in module, , want child scope of variable no longer available. otherwise, can use variable identify child.
Comments
Post a Comment