/usr/share/doc/libswf-perl/examples/action.cgi is in libswf-perl 1:0.4.4-1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #!/usr/bin/perl -wT
use strict;
use SWF qw(:ALL);
SWF::setScale(1.0);
SWF::setVersion(4);
print "Content-type: application/x-shockwave-flash\n\n";
my $s = new SWF::Shape();
my $f = $s->addFill(0xff, 0, 0);
$s->setRightFill($f);
$s->movePenTo(-500,-500);
$s->drawLineTo(500,-500);
$s->drawLineTo(500,500);
$s->drawLineTo(-500,500);
$s->drawLineTo(-500,-500);
my $p = new SWF::MovieClip();
my $i = $p->add($s);
$i->setDepth(1);
$p->nextFrame();
for(my $n=0; $n<5; ++$n){
$i->rotate(-15);
$p->nextFrame();
}
my $m = new SWF::Movie();
$m->setBackground(0xff, 0xff, 0xff);
$m->setDimension(6000,4000);
$i = $m->add($p);
$i->setDepth(1);
$i->moveTo(-500,2000);
$i->setName("box");
$m->add(new SWF::Action("x=-100;"));
$m->nextFrame();
$m->add(new SWF::Action("x+=3; /box._x=x;"));
$m->nextFrame();
$m->add(new SWF::Action("gotoFrame(1); play();"));
$m->nextFrame();
# decide if its called from commandline or as cgiscript
if (exists $ENV{"REQUEST_URI"}){
print "Content-type: application/x-shockwave-flash\n\n";
$m->output();
}
else {
$m->save("$0.swf");
print "Generated file written to $0.swf\n";
}
|