PERL   19

action-cgi

Guest on 3rd July 2022 04:55:06 PM

  1. #!/usr/bin/perl
  2. use strict;
  3.  
  4. use SWF qw(:ALL);
  5.  
  6. #SWF::setScale(1.0);
  7. print "Content-type: application/x-shockwave-flash\n\n";
  8.  
  9. my $s = new SWF::Shape();
  10. my $f = $s->addFill(0xff, 0, 0);
  11. $s->setRightFill($f);
  12.  
  13. $s->movePenTo(-500,-500);
  14. $s->drawLineTo(500,-500);
  15. $s->drawLineTo(500,500);
  16. $s->drawLineTo(-500,500);
  17. $s->drawLineTo(-500,-500);
  18.  
  19. #my $p = new SWF::Sprite();
  20. my $p = new SWF::MovieClip();
  21. my $i = $p->add($s);
  22. $i->setDepth(1);
  23. $p->nextFrame();
  24.  
  25. for(my $n=0; $n<5; ++$n) {
  26.   $i->rotate(-15);
  27.   $p->nextFrame();
  28. }
  29.  
  30. my $m = new SWF::Movie();
  31. $m->setBackground(0xff, 0xff, 0xff);
  32. $m->setDimension(6000,4000);
  33.  
  34. my $j = $m->add($p);
  35. $j->setDepth(1);
  36. $j->moveTo(-500,2000);
  37. $j->setName('todboxclip');
  38.  
  39. my $j2 = $m->add($p);
  40. $j2->setDepth(2);
  41. $j2->moveTo(-500,1500);
  42. $j2->setName('todboxclip2');
  43.  
  44. $m->add( new SWF::Action("x=-100;") );
  45. $m->nextFrame();
  46. $m->add( new SWF::Action('x+=40; todboxclip._x=x; todboxclip._y -= 10; ') );
  47. $m->nextFrame();
  48. $m->add( new SWF::Action("gotoFrame(1); play();"));
  49. $m->nextFrame();
  50.  
  51. $m->output();

Raw Paste


Login or Register to edit or fork this paste. It's free.