December 2002
Beginner
478 pages
17h 55m
English
The SWF::Text object can be used to draw simple blocks of colored text. The following code excerpt creates a two-line text block:
my $f = new SWF::Font("./Arial.fdb");
my $t = new SWF::Text( );
$t->setFont($f);
$t->setHeight(1200);
$t->moveTo(200,1200);
$t->setColor(255, 0, 0);
$t->addString("Foo ");
$t->moveTo(200, 2400);
$t->addString("Bar.");Use the SWF::Shape::drawGlyph(
) method if you want to draw characters with special fills
or morph into other characters. If you need to create a block of text
that can be updated dynamically, use the SWF::TextField
object.
Read now
Unlock full access