#!/usr/bin/perl use strict; use SWF qw(:ALL); use SWF::Constants qw(:Fill); #SWF::setScale(1.0); #SWF::setScale(20.0); print "Content-type: application/x-shockwave-flash\n\n"; my $gradient1 = new SWF::Gradient(); $gradient1->addEntry(0.0,255,255,255); $gradient1->addEntry(0.2,255,255,0); $gradient1->addEntry(0.4,255,0,0); $gradient1->addEntry(0.6,255,0,255); $gradient1->addEntry(0.8,0,0,255); $gradient1->addEntry(1.0,0,0,0); my $shape1 = new SWF::Shape(); $shape1->setLine(5,0,0,255); $shape1->drawLine(440,0); my $shape2 = new SWF::Shape(); $shape2->setLine(1,0,0,0); my $fill1 = $shape2->addFill($gradient1, SWFFILL_LINEAR_GRADIENT); $fill1->scaleTo(0.04); $fill1->moveTo(30,0); $shape2->setRightFill($fill1); $shape2->drawLine(50,0); $shape2->drawLine(0,50); $shape2->drawLine(-50,0); $shape2->drawLine(0,-50); my $shape3 = new SWF::Shape(); $shape3->setLine(1,0,0,0); my $fill2 = $shape3->addFill($gradient1, SWFFILL_RADIAL_GRADIENT); $fill2->scaleTo(0.1); $fill2->moveTo(10,10); $shape3->setRightFill($fill2); my $ra = 40; my $x = 40; my $y = 40; my $a = $ra * 0.414213562; # = tan(22.5 deg) my $b = $ra * 0.707106781; # = sqrt(2)/2 = sin(45 deg) $shape3->movePenTo($x+$ra, $y); $shape3->drawCurveTo($x+$ra, $y-$a, $x+$b, $y-$b); $shape3->drawCurveTo($x+$a, $y-$ra, $x, $y-$ra); $shape3->drawCurveTo($x-$a, $y-$ra, $x-$b, $y-$b); $shape3->drawCurveTo($x-$ra, $y-$a, $x-$ra, $y); $shape3->drawCurveTo($x-$ra, $y+$a, $x-$b, $y+$b); $shape3->drawCurveTo($x-$a, $y+$ra, $x, $y+$ra); $shape3->drawCurveTo($x+$a, $y+$ra, $x+$b, $y+$b); $shape3->drawCurveTo($x+$ra, $y+$a, $x+$ra, $y); my $font = new SWF::Font("fonts/BankGothic%20Md%20BT.fdb"); my $text = new SWF::Text(); $text->setFont($font); $text->setColor(255,255,0); $text->setHeight(40); $text->addString("Skovran Rulez!!"); my $movie=new SWF::Movie(); $movie->setDimension(460,80); $movie->setBackground(255,0,0); my $firstLine = $movie->add($shape1); $firstLine->moveTo(10,10); my $secondLine = $movie->add($shape1); $secondLine->moveTo(10,70); my $firstSquare = $movie->add($shape2); $firstSquare->moveTo(15,15); my $secondSquare = $movie->add($shape2); $secondSquare->moveTo(395,15); my $firstCircle = $movie->add($shape3); $firstCircle->moveTo(190,0); my $firstText = $movie->add($text); $firstText->moveTo((460/2-($text->getWidth(" My First Flash!"))/2)+10,50); $movie->output();