<?
  $p = new SWFMorph();

  $s = $p->getShape1();
  $s->setLine(0,0,0,0);
  $s->setLeftFill($s->addFill(0xff, 0, 0));
  $s->movePenTo(-100,-100);
  $s->drawLine(200,0);
  $s->drawLine(0,200);
  $s->drawLine(-200,0);
  $s->drawLine(0,-200);

  $s = $p->getShape2();
  $s->setLine(6,0,0,0);
  $s->setLeftFill($s->addFill(0, 0, 0xff));
  $s->movePenTo(0,-100);
  $s->drawLine(100,100);
  $s->drawLine(-100,100);
  $s->drawLine(-100,-100);
  $s->drawLine(100,-100);

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $m->setBackground(0xff, 0xff, 0xff);

  $i = $m->add($p);
  $i->moveTo(160,120);

  for($r=0.0; $r<=1.0; $r+=0.1)
  {
    $i->setRatio($r);
    $m->nextFrame();
  }

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>

click for popup

back to examples

All content Copyright (C) 2000-2001 Opaque Industries except where noted otherwise.