PHP Velho Oeste 2024

SWFButton::addAction

(PHP 5 < 5.3.0, PECL ming SVN)

SWFButton::addActionAdds an action

Descrierea

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

Această funcție este EXPERIMENTALĂ. Comportamentul acestei funcții, denumirea sa și orice alte aspecte documentate în privința acestei funcții pot să fie modificate fără preaviz într-o versiune viitoare a PHP. Utilizați această funcție la propriul risc.

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

Parametri

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.

Valorile întoarse

Nu este întoarsă nici o valoare.

A se vedea și

add a note add a note

User Contributed Notes 1 note

up
0
T_wigg
20 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();
To Top