SWFButton

Roll over it, click it, see it call action code. Swank.


$b = new SWFButton();
b = SWFButton()
SWFButton *b = new SWFButton();
SWFButton b = newSWFButton();

Create a new SWFButton object.


$b->addShape($shape, $flags);
b.addShape(shape, flags)
b->addShape(shape, flags);
SWFButton_addShape(b, shape, flags);
Add the shape shape to this button. The following flags are valid:
SWFBUTTON_UP
SWFBUTTON_OVER
SWFBUTTON_DOWN
SWFBUTTON_HIT
SWFBUTTON_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.


$b->setUp($shape);
b.setUp(shape)
b->setUp(shape);
SWFButton_setUp(b, shape);
Alias for addShape(shape, SWFBUTTON_UP)


$b->setOver($shape);
b.setOver(shape)
b->setOver(shape);
SWFButton_setOver(b, shape);
Alias for addShape(shape, SWFBUTTON_OVER)


$b->setDown($shape);
b.setDown(shape)
b->setDown(shape);
SWFButton_setDown(b, shape);
Alias for addShape(shape, SWFBUTTON_DOWN)


$b->setHit($shape);
b.setHit(shape)
b->setHit(shape);
SWFButton_setHit(b, shape);
Alias for addShape(shape, SWFBUTTON_HIT)


$b->addAction($action, $flags);
b.addAction(action, flags)
b->addAction(action, flags);
SWFButton_addAction(b, action, flags);
Add the action action to this button for the given conditions. The following flags are valid:
SWFBUTTON_MOUSEOVER
SWFBUTTON_MOUSEOUT
SWFBUTTON_MOUSEUP
SWFBUTTON_MOUSEUPOUTSIDE
SWFBUTTON_MOUSEDOWN
SWFBUTTON_DRAGOUT
SWFBUTTON_DRAGOVER
See the example for specifics.


$b->setAction($action);
b.setAction(action)
b->setAction(action);
SWFButton_setAction(b, action);
Sets the action to be performed when the button is clicked. Alias for addAction(shape, SWFBUTTON_MOUSEUP)


Simple button example
More interesting button example

back to index


All content Copyright (C) 2000-2002 Opaque Industries except where noted otherwise.