Made to Order Software Corporation Logo

ActionScript

SymbolClass

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

Instantiate objects from a set of classes.

Tag Structure: 
struct swf_symbolclass {
	swf_tag			f_tag;		/* 76 */
	unsigned short		f_symbol_count;
	struct {
		unsigned short		f_symbol_id;
		string			f_symbol_name;
	} f_symbol_references[f_symbol_count];
};

The SymbolClass tag is used to instantiate objects from action script version 3 definitions (see DoABCDefine.) You can instantiate each object only once with this technique.

The f_symbol_id references an ActionScript version 3 object (DoABC) and the f_symbol_name references the class to instantiate.

When f_symbol_id is set to zero, this tag becomes a special case and uses the f_symbol_name as the name of the top level class (root? TBD.)

NameCharacter

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

Define the name of an object (for buttons, bitmaps, sprites and sounds.)

Tag Structure: 

Unknown

Intended to name objects so one can reference them in an ActionScript. Instead, PlaceObject2 was used which is better since one object can be placed multiple times in your display list and each should have a different name. With the PlaceObject2 tag, it works that way.

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:

SWF Actions

The pages defined below include all the actions defined in Flash.

Different actions are supported in different version, so please, look at the version when attempting to use that action.

Some actions have been deprecated and should not be used in newer version of Flash (mainly the untyped operators.)

There are two schemes supported in Flash 9 and over: ActionScript 2 and 3 (also referenced as AS2 and AS3.)

SWF Any Filter (swf_any_filter)

SWF Structure Info
Tag Flash Version: 
8
SWF Structure: 
/* the filter type */
struct swf_filter_type {
	unsigned char	f_type;
};

struct swf_filter_glow {
	swf_filter_type	f_type;		/* 0, 2, 3, 4 or 7 */
	if(f_type == GradientGlow || f_type == GradientBevel) {
		unsigned char		f_count;
	}
	else {
		f_count = 1;
	}
	swf_rgba		f_rgba[f_count];
	if(f_type == Bevel) {
		swf_rgba		f_highlight_rgba[f_count];
	}
	if(f_type == GradientGlow || f_type == GradientBevel) {
		unsigned char		f_position[f_count];
	}
	signed long fixed	f_blur_horizontal;
	signed long fixed	f_blur_vertical;
	if(f_type != Glow) {
		signed long fixed	f_radian_angle;
		signed long fixed	f_distance;
	}
	signed short fixed	f_strength;
	unsigned		f_inner_shadow : 1;
	unsigned		f_knock_out : 1;
	unsigned		f_composite_source : 1;
	if(f_type == Bevel) {
		unsigned		f_on_top : 1;
	}
	else {
		unsigned		f_reserved : 1;
	}
	if(f_type == GradientGlow || f_type == GradientBevel) {
		unsigned		f_passes : 4;
	}
	else {
		unsigned		f_reserved : 4;
	}
};

struct swf_filter_blur {
	swf_filter_type		f_type;	/* 1 */
	unsigned long fixed	f_blur_horizontal;
	unsigned long fixed	f_blur_vertical;
	unsigned		f_passes : 5;
	unsigned		f_reserved : 3;
};

struct swf_filter_convolution {
	swf_filter_type	f_type;		/* 5 */
	unsigned char	f_columns;
	unsigned char	f_rows;
	long float	f_divisor;
	long float	f_bias;
	long float	f_weights[f_columns × f_rows];
	swf_rgba	f_default_color;
	unsigned	f_reserved : 6;
	unsigned	f_clamp : 1;
	unsigned	f_preserve_alpha : 1;
};

struct swf_filter_colormatrix {
	swf_filter_type	f_type;		/* 6 */
	long float	f_matrix[20];
};

struct swf_any_filter {
	swf_filter_type			f_fitler_type;
	swf_filter_blur			f_filter_blur;
	swf_filter_colormatrix		f_filter_colormatrix;
	swf_filter_convolution		f_filter_convolution;
	swf_filter_glow			f_filter_glow;
};

A filter defines how to transform the objects it is attached to. The first byte is the filter type. The data following depend on the type. Because each filter is much different, they are defined in separate structures. You can attach a filter to an object using an ActionScript or the PlaceObject3 tag.

The following describes the different filters available since version 8.

...
Value Name Version
0 Drop Shadow 8

PathsArePostscript

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

The shape paths are defined as in postscript?

Tag Structure: 

Unknown

Apparently there was some testing with using Postscript like instructions to render shapes. I support that is close to the time when the ActionScript language was not yet fully functional. The content of this tag is not described anywhere and is more than likely not supported in newer versions.

About SWF

Brief History

At the very beginning, a company created the SWF format to generate small vector animations on the Internet called Shockwave Flash (hence the name of the format, SWF.) It also included images. This company was bought by Macromedia around 1997 (if I recall properly). This is when Flash v3 was created. Since then, Macromedia created a new version about once a year up to version 8. At that time (in 2005/2006), Macromedia sealed a deal with Adobe which wanted to use the SWF format in their PDF files.

Today (May 1st, 2008), the SWF format is available for free to all.

There was ...

Adobe Flash Animation by Made to Order Software

Making a great thing even better!

The letters SSWF in a curly font with dots on the ends.

Using our robust open-source C++ library and scripting language, ScriptSWF (SSWF), you can create Adobe Flash animations on the fly.

Since it's initial release in 2002, SSWF has been extremely popular. Despite never being advertised, it has been downloaded more than 77,250 times just on SourceForge.net, has been converted to work on several Unix platforms not initially ...