SWFButtonThis is the old school SWF button, not the fancy new thing that has actions sticking out every which way. One button, one action. Nice and simple.
$b = new SWFButton();
Create a new SWFButton object.$b->setUp($s);
Set the button's up state to shape $s.$b->setOver($s);
Set the button's over state to shape $s.$b->setDown($s);
Set the button's down state to shape $s.$b->setHit($s);
Set the button's hit region to shape $s.$b->setAction($a);
Set the action to be performed when this button is clicked to $a.
New methods:
$b->addShape($s, stateflags);
Add the shape $s to this button for the given states. The following flags are valid:SWFBUTTON_UPSWFBUTTON_HIT isn't ever displayed, it defines the hit region for the button. That is, everywhere the hit shape would be drawn is considered a "touchable" part of the button.
SWFBUTTON_OVER
SWFBUTTON_DOWN
SWFBUTTON_HIT$b->addAction($a, conditionflags);
Add the action $a to this button for the given conditions. The following flags are valid:SWFBUTTON_MOUSEOVERSee the example for specifics:
SWFBUTTON_MOUSEOUT
SWFBUTTON_MOUSEUP
SWFBUTTON_MOUSEUPOUTSIDE
SWFBUTTON_MOUSEDOWN
SWFBUTTON_DRAGOUT
SWFBUTTON_DRAGOVER
SWFBUTTON_KEYPRESS(c) where c is a character to test for, e.g. 'a'
All content Copyright (C) 2000 Opaque Industries except where noted otherwise.