// Using GlowFilter and DropShadowFilter in the filters filter package, we can easily achieve the text stroke and shadow effects in PS. // The following is a demo code for the commonly used 12px ING and shadow effects: // Text stroke effect Var tf1 = _ root. createTextField ("tf1", _ root. getNextHighestDepth (), 10, 10, 0, 0 ); Tf1.autoSize = true; Tf1.text = "AS trace text effect demonstration "; Tf1.textColor = 0xFFFF00; Var myGlowFilter = new flash. filters. GlowFilter (0x000000, 1, 2, 2, 10, 1, false, false ); Var myFilters: Array = tf1.filters; MyFilters. push (myGlowFilter ); Tf1.filters = myFilters; // Text shadow effect Var tf2 = _ root. createTextField ("tf2", _ root. getNextHighestDepth (), 10, 30, 0, 0 ); Tf2.autoSize = true; Tf2.text = "AS shadow text effect demonstration "; Tf2.textColor = 0x000000; Var myDropFilter = new flash. filters. DropShadowFilter (1, 45, 0 xFFFFFF, 1, 1, 1, 10, 1, false, false ); Var myFilters2: Array = tf2.filters; MyFilters2.push (myDropFilter ); Tf2.filters = myFilters2; |