actionscript 3 - Action Script 3. How to set background -
i'm creating flash game, here restart button , have function delete objects (children) stage.
function restartgame(e:mouseevent):void { while (numchildren > 0) { removechildat(0); } addchild(_cards); //here need add background startmemorygame(); }
at normal don't need add background, when game started added automatic. in library called background.jpg, converted graphic , named background added linkage "background" addchild(background);
doesn't work me. me? thank you.
i assuming set linkage on image, in case go :
var background:bitmap = new bitmap(new background); addchild(background);
if it's movieclip symbol linkage set, can :
var background:background = new background; addchild(background);
Comments
Post a Comment