SWFButton::addAction

(PHP 4 >= 4.0.5)

SWFButton::addActionAdds an action

Beskrivelse

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

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.

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

Parametre

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.

Returnerings Værdier

No value is returned.

Se også

add a note add a note

User Contributed Notes 1 note

up
-1
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