Made to Order Software Corporation Logo

data

Branch Always

SWF Action
Action Category: 
Control
Action Details: 
0
Action Identifier: 
153
Action Structure: 
signed short   f_offset;
Action Length: 
2 byte(s)
Action Stack: 
n.a.
Action Operation: 
ip += f_offset;   // ip past the branch action
Action Flash Version: 
4
See Also: 

Jump to the specified action. The offset is added to the current execution pointer as it is after reading the branch instruction.

IMPORTANT NOTES

The offset must be such that when added to the current execution pointer it points to a valid action (i.e. you cannot jump in the middle of a Push Data or any other multi-byte action.)

DefineBinaryData

Tag Info
Tag Number: 
87
Tag Type: 
Define
Tag Flash Version: 
9
Brief Description: 

Defines a buffer of any size with any binary user data.

Tag Structure: 
struct swf_definebinarydata {
	swf_tag			f_tag;		/* 87 */
	unsigned short		f_data_id;
	unsigned long		f_reserved;	/* must be zero */
	unsigned char		f_data[<variable size>];
};

The DefineBinaryData tag is used to save any arbitrary user defined binary data in an SWF movie. The Flash player itself ignores that data. The size of the data is not specifically limited.

The f_data_id is this object identifier. The identifier is the same type as any identifier (like a sprite identifier.) It is used in ActionScripts to reference the data.

The f_reversed area is 32 bits and it must be set to zero in version 9.

DefineSceneAndFrameData

Tag Info
Tag Number: 
86
Tag Type: 
Define
Tag Flash Version: 
9
Brief Description: 

Define raw data for scenes and frames.

Tag Structure: 
struct swf_definesceneandframedata {
	swf_tag				f_tag;		/* 86 */
	unsigned char			f_data[tag size];
};

This tag is used to define some raw data for a scene and frame. It is often used to include XML files in Flash animations.

f_data is an array of bytes.

DoABCDefine

Tag Info
Tag Number: 
72
Tag Type: 
Action
Tag Flash Version: 
9
Brief Description: 

New container tag for ActionScripts under SWF 9. Includes only actions. This tag is not defined in the official Flash documentation.

Tag Structure: 
struct swf_doabc {
	swf_tag			f_tag;		/* 72 or 82 */
	if(f_tag == DoABC) {
		unsigned long	f_action_flags;
		string		f_action_name;
	}
	swf_action3		f_action_record[variable];
};

*the version specified here is the version in which the tags appeared—however, actions of higher versions can be used with older version tags and thus this version doesn't indicate the version of all the actions used in this tag

The DoABC and DoABCDefine are available since version 9. These are similar to the old DoAction and DoInitAction, yet the actions use a way different declaration scheme and they include flags and a name. This new scheme helps greatly in simplifying the definitions of ECMAScript classes and accelerate the access to the code tremendously.

Note that the ...

VideoFrame

Tag Info
Tag Number: 
61
Tag Type: 
Define
Tag Flash Version: 
6
Brief Description: 

Show the specified video frame of a movie.

Tag Structure: 
struct swf_startsound {
	swf_tag			f_tag;		/* 61 */
	unsigned short		f_video_id_ref;
	unsigned short		f_frame;
	unsigned char		f_video_data[variable size];
};

The VideoFrame tag is used to render one frame. It includes the data of exactly one video frame to be drawn on the screen.

The f_object_id_ref parameter is a reference to a DefineVideoStream.

Export

Tag Info
Tag Number: 
56
Tag Type: 
Define
Tag Flash Version: 
5
Brief Description: 

Exports a list of definitions declared external so they can be used in other movies. You can in this way create one or more movies to hold a collection of objects to be reused by other movies without having to duplicate these in each movie. A single export is enough for an entire movie (and you should have just one).

Tag Structure: 
struct swf_export {
	swf_tag			f_tag;		/* 56 */
	unsigned short		f_count;
	swf_external		f_symbol[f_count];
};

The Export tag works in conjunction with the Import and Import2 tags. The Export tag gives a list of definitions made visible to the external world. Thus these definitions are in effect available to be imported by other movies.

DefineSprite

Tag Info
Tag Number: 
39
Tag Type: 
Define
Tag Flash Version: 
3
Brief Description: 

Declares an animated character. This is similar to a shape with a display list so the character can be changing on its own over time.

Tag Structure: 
struct swf_definesprite {
	swf_tag			f_tag;		/* 39 */
	unsigned short		f_sprite_id;
	unsigned short		f_frame_count;
	...			<data>;
	swf_tag			f_end;
};

A sprite is a set of SWF tags defining an animated object which can then be used as a simple object. A sprite cannot contain another sprite. hHowever, you can use PlaceObject2 to place a sprite in another.

The following are the tags accepted in a Sprite:

Appendix B — History of the SSWF reference

Dec 2, 2009

Moved the monolithic documentation to a multi-page hierarchical document that includes everything we had before plus many links, many terms attached to all pages (tags, English words.) And revision of most of the text for better English and clarification in some places.

Strengthen the formatting with CCK fields so all declarations look alike.

Broken up the actions from one large table to a set of pages.

Dec 14, 2008

Started work on the Load() feature of the SSWF library. This helped fixing several small mistakes in the documentation.

May 18, 2008

Fixed the ...

The SSWF Project

The SWF Reference by Alexis is part of the free SSWF project.

This documentation is intended for people who want to program a Flash player, editor, or some similar tool handling Flash data.

The project comes with a complete C++ library that is designed to greatly simplify the generation and loading of Flash files.

SWF Zone Data (swf_zone_data)

SWF Structure Info
Tag Flash Version: 
8
SWF Structure: 
struct swf_zone_data {
	short float		f_zone_position;
	short float		f_zone_size;
};

The swf_zone_array includes an array of zone data as described below:

The f_zone_position specifies the X or Y coordinate. The array can either include only horizontal, only vertical or both sets of coordinates.

The f_zone_size specifies the Width or Height of the zone.