#!/usr/bin/perl use strict; use SWF qw(:ALL); use SWF::Constants qw(:Fill); my $myShape1 = new SWF::Shape(); $myShape1->setLine(50,0,0,255); $myShape1->setRightFill(255,255,0); $myShape1->movePen(-30,-30); $myShape1->drawLine(60,0); $myShape1->drawLine(0,60); $myShape1->drawLine(-60,0); $myShape1->drawLine(0,-60); my $m = new SWF::Movie(); $m->setDimension(460,80); $m->setBackground(255,0,0); $m->setRate(30); my $movingSquare = $m->add($myShape1); $movingSquare->moveTo(230,40); $m->nextFrame(); for(my $i=0 ; $i<50 ; $i++ ) { $movingSquare->move(10 - $i,$i/10); $m->nextFrame(); } print "Content-type: application/x-shockwave-flash\n\n"; $m->output();