Shinder Lin, JavaScript, PHP
// 底var bmd:BitmapData = new BitmapData(200, 200, true, 0xFFCCCCCC);var seed:int = int(Math.random() * int.MAX_VALUE);var channels:uint = BitmapDataChannel.RED | BitmapDataChannel.BLUE;bmd.perlinNoise(100, 80, 12, seed, false, true, channels, false, null);var bm:Bitmap = new Bitmap(bmd);this.addChild(bm);// 動態文字var _txt:TextField = new TextField;_txt.autoSize = "left";var myTextFormat:TextFormat = new TextFormat(null, 30, 0, true);_txt.text = "動態文字";_txt.x = 50;_txt.setTextFormat(myTextFormat);this.addChild(_txt);// 建立替身import lin.shinder.display.Substitute;var s:Substitute = new Substitute(_txt).displace();s.rotation = 30;// 設定遮罩bm.cacheAsBitmap = true;s.cacheAsBitmap = true;bm.mask = s;
張貼留言
沒有留言:
張貼留言