Technology
filterを使う
2010-09-03ActionScript
とりあえず、テキストにGlowFilter(外部の発光)をかけてみました。
package{ import flash.display.*; import flash.text.*; import flash.filters.GlowFilter; public class Main extends Sprite{ private var tf:TextField; public function Main(){ var bg:Shape = new Shape(); bg.graphics.beginFill(0x000000); bg.graphics.drawRect(0, 0, 400,200); bg.graphics.endFill(); addChild(bg); var tfFmt:TextFormat = new TextFormat(); tfFmt.font = "Arial"; tfFmt.color = 0xFFFFFF; tfFmt.size = 48; tfFmt.kerning=true; tf = new TextField(); tf.defaultTextFormat=tfFmt; tf.text="10"; tf.filters = [new GlowFilter(0x77ca74, 1, 16, 16, 3, 1)]; addChild(tf); } } }
Topic
- Languages (24)
- ActionScript (8)
- C# (1)
- Java (6)
- Android (2)
- JavaScript (5)
- JavaScript (4)
- node.js (1)
- Perl (4)
- Database (3)
- MySQL (3)
- Miscellaneous (5)