Made to Order Software Corporation Logo

DefineButton2

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

Define an action button. Includes a color transformation. 

Tag Structure: 
struct swf_definebutton2 {
	swf_tag		f_tag;		/* 34 */
	unsigned short		f_button_id;
	unsigned		f_reserved : 7;
	unsigned		f_menu : 1;
	unsigned short		f_buttons_size;
	swf_button		f_buttons;
	swf_condition		f_conditions;
};

The DefineButton2 is very similar to the DefineButton tag. The list of actions was however changed in a list of actions to execute on a condition. Whenever an event occur, the plugin checks for that condition within all the buttons which can possibly catch that event at the time. For all the matches it finds, the corresponding actions are executed.

The f_buttons_size is equal to the size of the f_buttons buffer plus 2 (the size of the f_buttons_size field itself). Note however that if you don't have any conditions, the f_buttons_size field will be zero (0). This is similar to the list of conditions which also ends with a condition having a size of zero (0). You can still deduce the size of the f_buttons when the f_button_size is zero by using the total tag size minus the offset where the f_buttons declarations start.

Comments

Post new comment

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