- Drag & Drop the image you want to tile on the stage
- Go to the Library, you’ll see that a Bitmap has been added, change the properties of it
- Activate the Advanced options if it isn’t shown
- Select both options in Linkage, and write a Class Name, for example “Background”
From now on, you’ll access your image as if it were a Class.
You can now make your image and tile it like so:
var backGroundSprite:Sprite = new Sprite();//Background Class is actually the linkage to background.jpg in de LibrarybackGroundSprite.graphics.beginBitmapFill(new Background(0, 0));backGroundSprite.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);backGroundSprite.graphics.endFill();//Add and display on stageaddChild(backGroundSprite);