SWFButton
在线手册:中文  英文

SWFButton::addAction

(PHP 4 >= 4.0.5)

SWFButton::addActionAdds an action

说明

void SWFButton::addAction ( SWFAction $action , int $flags )
Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

Adds the given action to the button for the given conditions.

参数

action

An SWFAction, returned by SWFAction::__construct().

flags

The following flags are valid: SWFBUTTON_MOUSEOVER, SWFBUTTON_MOUSEOUT, SWFBUTTON_MOUSEUP, SWFBUTTON_MOUSEUPOUTSIDE, SWFBUTTON_MOUSEDOWN, SWFBUTTON_DRAGOUT and SWFBUTTON_DRAGOVER.

返回值

没有返回值。

参见


SWFButton
在线手册:中文  英文

用户评论:

T_wigg (2003-09-21 21:41:43)

I had a hard time finding a way to stop a sprite, so I figured I would post it.
$button = new SWFButton();
$button->addShape($box, SWFBUTTON_UP | SWFBUTTON_HIT | SWFBUTTON_OVER | SWFBUTTON_DOWN);
$button->addAction(new SWFAction("
setTarget('box');
stop();
"), SWFBUTTON_MOUSEUP);

$item = $movie->add($button);
This works the same way with play();

易百教程