1#!/usr/bin/perl -w 2use strict; 3 4#use lib("/home/peter/ming3/lib/perl5/site_perl"); 5 6$|=1; 7use SWF qw(Movie Font Text); 8SWF::setScale(1.0); 9 10# Add path to your *.fdb file 11my $filename = '../common/_sans.fdb'; 12 13my $f= new SWF::Font($filename); 14 15my $t= new SWF::Text(); 16$t->setFont($f); 17$t->moveTo(200, 2400); 18$t->setColor(0xff, 0x0, 0); 19$t->setHeight(1200); 20$t->addString("ming!"); 21 22my $m = new SWF::Movie(); 23$m->setDimension(5400, 3600); 24 25$m->add($t); 26 27# decide if its called from commandline or as cgiscript 28if (exists $ENV{"REQUEST_URI"}){ 29 print "Content-type: application/x-shockwave-flash\n\n"; 30 $m->output(); 31} 32else { 33 $m->save("$0.swf"); 34 print "Generated file written to $0.swf\n"; 35} 36 37 38