function label($string)
{
global $f;
$t = new SWFTextField();
$t->setFont($f);
$t->addString($string);
$t->setHeight(200);
$t->setBounds(4000,200);
return $t;
}
function addLabel($string)
{
global $p;
$i = $p->add(label($string));
$p->nextFrame();
$p->remove($i);
}
function rect($r, $g, $b, $signal)//buttonstyle
{
$s = new SWFShape();
if($signal==0)
{
$s->setRightFill($s->addFill(220, 220, 220));
}
else
{
$s->setRightFill($s->addFill(10, 10, 10));
}
$s->drawLine(180,0);
$s->drawLine(0,180);
$s->drawLine(-180,0);
$s->drawLine(0,-180);
if($signal==0)
{
$s->setRightFill($s->addFill(10, 10, 10));
}
else
{
$s->setRightFill($s->addFill(220, 220, 220));
}
$s->movepen(15,15);
$s->drawLine(165,0);
$s->drawLine(0,165);
$s->drawLine(-165,0);
$s->drawLine(0,-165);
$s->setRightFill($s->addFill($r,$g,$b));//button surface
$s->drawLine(150,0);
$s->drawLine(0,150);
$s->drawLine(-150,0);
$s->drawLine(0,-150);
return $s;
}
$f = new SWFFont("_serif");
$p = new SWFSprite();
$p->add(new SWFAction("stop();"));
addLabel("");
addLabel("this site");
addLabel("this forum");
addLabel("forum's index page");
$b = new SWFButton();
$b->addShape(rect(0xff, 0, 0,0), SWFBUTTON_UP | SWFBUTTON_HIT);
$b->addShape(rect(0xff, 0xff, 0,1), SWFBUTTON_DOWN);
$b->addShape(rect(0xff, 0xff, 0,0), SWFBUTTON_OVER);
$b->addAction(new SWFAction("setTarget('label'); gotoFrame(1);"), SWFBUTTON_MOUSEOVER);
$b->addAction(new SWFAction("getURL('http://www.trap17.com',target='_blank'); gotoFrame(1);"), SWFBUTTON_MOUSEUP);
$b->addAction(new SWFAction("setTarget('label'); gotoFrame(0);"), SWFBUTTON_MOUSEOUT);
$bb = new SWFButton();
$bb->addShape(rect(0xff, 0xff, 0,0), SWFBUTTON_UP | SWFBUTTON_HIT);
$bb->addShape(rect(0, 0xff, 0,1), SWFBUTTON_DOWN);
$bb->addShape(rect(0, 0xff, 0,0), SWFBUTTON_OVER);
$bb->addAction(new SWFAction("setTarget('label'); gotoFrame(2);"), SWFBUTTON_MOUSEOVER);
$bb->addAction(new SWFAction("getURL('http://www.trap17.com/forums',target='_blank'); gotoFrame(2);"), SWFBUTTON_MOUSEUP);
$bb->addAction(new SWFAction("setTarget('label'); gotoFrame(0);"), SWFBUTTON_MOUSEOUT);
$bbb = new SWFButton();
$bbb->addShape(rect(0, 0xff, 0,0), SWFBUTTON_UP | SWFBUTTON_HIT);
$bbb->addShape(rect(0xff, 0, 0,1), SWFBUTTON_DOWN);
$bbb->addShape(rect(0xff, 0, 0,0), SWFBUTTON_OVER);
$bbb->addAction(new SWFAction("setTarget('label'); gotoFrame(3);"), SWFBUTTON_MOUSEOVER);
$bbb->addAction(new SWFAction("getURL('http://www.trap17.com/forums/index.php?act=idx',target='_blank'); gotoFrame(3);"), SWFBUTTON_MOUSEUP);
$bbb->addAction(new SWFAction("setTarget('label'); gotoFrame(0);"), SWFBUTTON_MOUSEOUT);
$m = new SWFMovie();
$m->setDimension(4000,2000);
$i = $m->add($p);
$i->setName("label");
$i->moveTo(280,800);//label's location
$i = $m->add($b);
$i->moveTo(2000,1400);//button's location
$ii = $m->add($bb);
$ii->moveTo(2400,1400);
$iii = $m->add($bbb);
$iii->moveTo(2800,1400);
header('Content-type: application/x-shockwave-flash');
$m->output();
?>

