Made to Order Software Corporation Logo


Tag Info
Tag Number: 
Tag Type: 
Tag Flash Version: 
Unknown SWF Tag: 
This tag is defined by the Flash documentation by Adobe
Brief Description: 

Define an action button.

Tag Structure: 
struct swf_definebutton {
	swf_tag			f_tag;		/* 7 */
	unsigned short		f_button_id;
	swf_button		f_buttons;
	swf_action		f_actions;

Mouse interactivity in the SWF format comes from the buttons. All the buttons have an identifier and can be placed in the display list like any other shape.

A buttons has different states. Some states can be entered only when the button was in a specific state before (like a button being pushed).

Buttons can be represented graphically in any manner you want. Each state can use a different edit text, shape, sprite or text to render the button.

The f_buttons and f_actions are null terminated arrays (the end marker in either case is a byte set to zero).

There will always be at least one f_buttons since the object require at least one shape to be rendered (though the shape can very well be transparent and empty).

There is no need for any action. The actions are executed whenever the button is pushed. Note that it is possible to execute actions also when the mouse moves over a button (in, out, over) with the use of a sprite in version 5+. However, in this case it is certainly preferable to use a DefineButton2 instead.


Post new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.