package { import aether.effects.common.CompositeEffect; import aether.effects.texture.TextureEffect; import aether.textures.natural.StoneTexture; import aether.textures.patterns.CheckerPattern; import aether.textures.synthetic.TileTexture; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; [SWF(width=600, height=600, backgroundColor=0x000000)] /** * Demonstrates several built-in texture effects in aeon. */ public class graphic_flex_image_effects_07_Flex_Textures extends Sprite { /** * Constructor. Draws bitmap data with several textures applied. */ public function graphic_flex_image_effects_07_Flex_Textures() { var bitmapData:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight); new CompositeEffect( [ new TextureEffect( new StoneTexture(bitmapData.width, bitmapData.height, 0xAAAAAA) ), new TextureEffect( new CheckerPattern(200, 200, 0xFF223333, 0x00000000) ), new TextureEffect( new TileTexture(200, 0, 0, 0, 4, 0, .5, true) ) ] ).apply(bitmapData); addChild(new Bitmap(bitmapData)); } } }