AS3 tiled background


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var backGroundSprite:Sprite = new Sprite();
  2. backGroundSprite.graphics.beginBitmapFill( new BgPattern( 0, 0 ) );
  3. backGroundSprite.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
  4. backGroundSprite.graphics.endFill();
  5. addChildAt(backGroundSprite, 0);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.