<?
  function makeRect($r, $g, $b)
  {
    $s = new SWFShape();

    $s->setRightFill($s->addFill($r, $g, $b));
    $s->movePenTo(-50,-50);
    $s->drawLineTo(50,-50);
    $s->drawLineTo(50,50);
    $s->drawLineTo(-50,50);
    $s->drawLineTo(-50,-50);
    return $s;
  }

  $b = new SWFButton();
  $b->setUp(makeRect(0xff, 0, 0));
  $b->setOver(makeRect(0, 0xff, 0));
  $b->setDown(makeRect(0, 0, 0xff));
  $b->setHit(makeRect(0, 0, 0));

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

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

  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.