Hi, I’m attending to do a fill background when the web page resize with a bitmap tile.
I’ve achieved to do one with a vector graphic (draw by Flash), following this tutorial (http://www.senocular.com/pub/kirupa/as3tips_p8.html)
mport flash.display.BitmapData;
import flash.geom.Rectangle;
var square:Rectangle = new Rectangle(0, 0, 10, 10);
var tile:BitmapData = new BitmapData(20, 20, false, 0xFFFFFF);
tile.fillRect(square, 0xFF0000);
square.x = 10;
square.y = 10;
tile.fillRect(square, 0xFF0000);
this.graphics.beginBitmapFill(tile);
this.graphics.lineTo(this.stage.stageWidth, 0);
this.graphics.lineTo(this.stage.stageWidth, this.stage.stageHeight);
this.graphics.lineTo(0, this.stage.stageHeight);
this.graphics.lineTo(0, 0);
this.graphics.endFill();
When I’m attending to replace the vector graphic by mi image (gif), the script don’t work anymore. Here is the tutorial I’ve followed
import flash.display.BitmapData;
var tile:BitmapData = new MyImage();
this.graphics.beginBitmapFill(tile);
this.graphics.lineTo(this.stage.stageWidth, 0);
this.graphics.lineTo(this.stage.stageWidth, this.stage.stageHeight);
this.graphics.lineTo(0, this.stage.stageHeight);
this.graphics.lineTo(0, 0);
this.graphics.endFill();
Well, I don’t know if any of you see what is not working in my code. Any help would be much appreciated