EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 1248

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1248 ActionScript classes
Example
The following example specifies the
maxLevel value for the entire SWF file, and then displays
a text field with the value set. For the text in this example to display correctly, there must be a
font symbol available with a linkage identifier of
"CustomFont".
import flash.text.TextRenderer;
TextRenderer.maxLevel = 3;
var txtFormat:TextFormat = new TextFormat();
txtFormat.font = "CustomFont";
txtFormat.size = 64;
var label:TextField = this.createTextField("label",
this.getNextHighestDepth(), 10, 10, 500, 100);
label.setNewTextFormat(txtFormat);
label.text = "Hello World";
label.embedFonts = true;
trace("TextRenderer.maxLevel: " + TextRenderer.maxLevel);
setAdvancedAntialiasingTable
(TextRenderer.setAdvancedAntialiasingTable
method)
public static setAdvancedAntialiasingTable(fontName:String,
fontStyle:String, colorType:String, advancedAntialiasingTable:Array) :
Void
Sets a custom continuous stroke modulation (CSM) lookup table for a font. This is an
advanced method.
Flash Player only includes advanced anti-aliasing settings for 10 basic fonts; and for these
fonts, advanced anti-aliasing settings are only provided for the font sizes from 6 to 20. For
these fonts, all sizes below 6 use the settings for 6; all sizes above 20 use the settings for 20.
Other fonts map to the supplied font data. The
setAdvancedAntialiasingTable() method
lets you set custom anti-aliasing data for other fonts and font sizes, or override the default
settings for the provided fonts.
Availability: ActionScript 1.0; Flash Player 8

Table of Contents

Related product manuals