略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SWFButton::addAction

2024-12-21

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.

返回值

没有返回值。

参见

add a note add a note

User Contributed Notes 1 note

up
0
T_wigg
15 years ago
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();

官方地址:https://www.php.net/manual/en/swfbutton.addaction.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3