[摘要]SWFBUTTON_HIT); b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER); b->addShape(rect(0, 0, 0xff), ...
SWFBUTTON_HIT);
$b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER);
$b->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN);
$b->addAction(new SWFAction("setTarget('/box'); gotoandplay(2);"), SWFBUTTON_MOUSEDOWN);
/* 下面创建动画,并添加上面的符号和按钮 */
$m = new SWFMovie();
$m->setDimension(4000,3000);
$i = $m->add($sqclip);
$i->setDepth(3);
$i->moveTo(1650, 400);
$i->setName("box");
$i = $m->add($b);
$i->setDepth(2);
$i->moveTo(1400,900);
/* 最后,我们把它输出到浏览器 */
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
好了,在你的机器上运行一下看看,是不是和用Flash创建的一样!要得到更多的函数说明,请参考操作手册。
关键词:用PHP动态创建Flash动画