PERL   16

morph-cgi

Guest on 3rd July 2022 05:02:57 PM

  1. #!/usr/bin/perl
  2. use strict;
  3.  
  4. use SWF qw(:ALL);
  5. SWF::setScale(1.0);
  6.  
  7. print "Content-type: application/x-shockwave-flash\n\n";
  8.  
  9. my $p = new SWF::Morph();
  10.  
  11. my $s = $p->getShape1();
  12. $s->setLine();
  13. $s->setLeftFill(0xff, 0, 0);
  14. $s->movePenTo(-1000,-1000);
  15. $s->drawLine(2000,0);
  16. $s->drawLine(0,2000);
  17. $s->drawLine(-2000,0);
  18. $s->drawLine(0,-2000);
  19.  
  20. my $s1 = $p->getShape2();
  21. $s1->setLine(60,0,0,0);
  22. $s1->setLeftFill(0, 0, 0xff);
  23. $s1->movePenTo(-1000,-1000);
  24.  
  25. $s1->drawLine(1000,1000);
  26. $s1->drawLine(-1000,1000);
  27. $s1->drawLine(-1000,-1000);
  28. $s1->drawLine(1000,-1000);
  29.  
  30. my $m = new SWF::Movie();
  31. $m->setDimension(3000,2000);
  32. $m->setBackground(0xff, 0xff, 0xff);
  33.  
  34. my $i = $m->add($p);
  35. $i->moveTo(1500,1000);
  36.  
  37. for(my $r=0; $r<=10; ++$r){
  38.     $i->setRatio($r/10);
  39.     $m->nextFrame();
  40. }
  41.     $m->nextFrame();
  42.     $m->nextFrame();
  43.     $m->nextFrame();
  44.     $m->nextFrame();
  45.     $m->nextFrame();
  46.  
  47.  
  48. $m->output();

Raw Paste


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