php教程

SWFButton::addAction

(PHP 5 < 5.3.0, PECL ming SVN)

SWFButton::addActionAdds an action

说明

SWFButton::addAction ( SWFAction $action , int $flags ) : void
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.

返回值

没有返回值。

参见

User Contributed Notes

T_wigg 21-Sep-2003 09:41
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();

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788