Made to Order Software Corporation Logo

available

DefineBitsLossless

Tag Info
Tag Number: 
20
Tag Type: 
Define
Tag Flash Version: 
2
Brief Description: 

A bitmap compressed using ZLIB (similar to the PNG format).

Tag Structure: 
struct swf_definebitslossless {
	swf_long_tag		f_tag;		/* 20 or 36 */
	unsigned short		f_image_id;
	unsigned char		f_format;	/* 3, 4 or 5 */
	unsigned short		f_width;
	unsigned short		f_height;
	if(f_format == 3) {
		unsigned char	f_colormap_count;
		if(f_tag == DefineBitsLossless) {
			swf_rgb		f_colormap[f_colormap_count];
		}
		else {
			swf_rgba	f_colormap[f_colormap_count];
		}
		unsigned char	f_indices[((f_width + 3) & -4) * f_height];
	}
	else {
		if(f_tag == DefineBitsLossless) {
			swf_xrgb	f_bitmap[f_width * f_height];
		}
		else {
			swf_argb	f_bitmap[f_width * f_height];
		}
	}
};

These tags declares a loss-less image bitmap. It has a small header followed by an optional colormap and the bitmap data. When we have a colormap, the bitmap data is an array of indices in the colormap aligned to 4 bytes on a per row basis.

There are three supported formats:

...
Format
No.
(bits)
Color Format Comments
Without
Alpha
With
Alpha
3
(8 bits(1))
RGB

IEEE Standard 754

 

The original document by Steve Hollasch can be found at http://steve.hollasch.net/cgindex/coding/ieeefloat.html

IEEE Standard 754 Floating Point Numbers


IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intel-based PC's, Macintoshes, and most Unix platforms. This article gives a brief overview of IEEE floating point and its representation. Discussion of arithmetic implementation may be found in the book mentioned at the bottom of this article.

What Are Floating ...

DefineSound

Tag Info
Tag Number: 
14
Tag Type: 
Define
Tag Flash Version: 
2
Brief Description: 

Declare a sound effect. This tag defines sound samples that can later be played back using either a StartSound or a DefineButtonSound. Note that the same DefineSound block can actually include multiple sound files and only part of the entire sound can be played back as required.

Tag Structure: 
struct swf_definesound {
	swf_tag			f_tag;		/* 14 */
	unsigned short		f_sound_id;
	unsigned		f_sound_format : 4;
	unsigned		f_sound_rate : 2;
	unsigned		f_sound_is_16bits : 1;
	unsigned		f_sound_is_stereo : 1;
	unsigned long		f_sound_samples_count;
	unsigned char		f_sound_data[<variable size>];
};

A DefineSound tag declares a set of samples of a sound effect or a music.

The sound samples can be compressed or not, stereo or not and 8 or 16 bits. The different modes are not all available in version 2, although the same tag is used in newer versions with additional capabilities.

The f_sound_is_16bits is always set to 1 (16bits samples) if the samples are compressed (neither Rawnor Uncompressed).

The f_sound_rate represents the rate at which the samples are defined. The rate at which it will be played on the target computers may differ. The following equation can be used to determine the ...

DoAction

Tag Info
Tag Number: 
12
Tag Type: 
Action
Tag Flash Version: 
1
Brief Description: 

Actions to perform at the time the next show frame is reached and before the result is being displayed. It can duplicate sprites, start/stop movie clips, etc.

All the actions within a frame are executed sequentially in the order they are defined.

Important: many actions are not supported in Adobe Flash version 1. Please, see the reference of actions below in order to know which actions can be used with which version of Adobe Flash.

Tag Structure: 
struct swf_doaction {
	swf_tag			f_tag;		/* 12 and 59 */
	if(f_tag == DoInitAction) {
		unsigned short	f_action_sprite;
	}
	swf_action		f_action_record[variable];
};

The DoAction tag will be used to execute a set of actions in place. Usually, actions are used on buttons to add interactivity to the SWF movies. In version 1 you had only one dynamic branch (WaitForFrame). In version 4 you can test many different things such as a position, angle or sound track cursor position. Since version 5, SWF has a complete scripting language supporting string and arithmetic operations.

SWF Tags

The following table is a list of all the SWF tags defined in this documentation.

This table presents the tags sorted using their number. There are tables available to find tags by name, by version of Flash releases, and by type.

ID Tag Name Type Comments Versionsort icon
-1. File Header Format

Although it isn't a tag per say, we consider the file header as being a tag because it represents a block in the flash file. Since version 8, it can be complemented by the FileAttributes tag.

1
End Format

Mark the end of the file or a Sprite. It can't appear anywhere else but the end of the file or a Sprite.

1
1. ShowFrame Display

Display the current display list and pauses for 1 frame as defined in the file header.

1
2. DefineShape Define

Define a simple geometric shape.

1
3. FreeCharacter Define

Release a character which won't be used in this movie anymore.

1
4. PlaceObject Display

Place the specified object in the current display list.

1
5. RemoveObject Display

Remove the specified object at the specified depth.

1
6. DefineBitsJPEG Define

Define a JPEG bit stream.

1
7. DefineButton Define

Define an action button.

1
8. JPEGTables Define

Define the tables used to compress/decompress all the SWF 1.0 JPEG images (See also DefineBitsJPEG.)

1
9. SetBackgroundColor Display

Change the background color. Defaults to white if unspecified.

1
10. DefineFont Define

List shapes corresponding to glyphs.

1
11. DefineText Define

Defines a text of characters displayed using a font. This definition doesn't support any transparency.

1
12. DoAction Action

Actions to perform at the time the next show frame is reached and before the result is being displayed. It can duplicate sprites, start/stop movie clips, etc.

All the actions within a frame are executed sequentially in the order they are defined.

Important: many actions are not supported in Adobe Flash version 1. Please, see the reference of actions below in order to know which actions can be used with which version of Adobe Flash.

1
13. DefineFontInfo Define

Information about a previously defined font. Includes the font style, a map and the font name.

1
42. DefineTextFormat Define

Another tag that Flash ended up not using.

1
14. DefineSound Define

Declare a sound effect. This tag defines sound samples that can later be played back using either a StartSound or a DefineButtonSound. Note that the same DefineSound block can actually include multiple sound files and only part of the entire sound can be played back as required.

2
15. StartSound Display

Start playing the referenced sound on the next ShowFrame.

2
15. StopSound Display

Start playing the referenced sound on the next ShowFrame.

2
17. DefineButtonSound Define

Defines how to play a sound effect for when an event occurs on the referenced button.

2
18. SoundStreamHead Define

Declare a sound effect which will be interleaved with a movie data so as to be loaded over a network connection while being played.

2
19. SoundStreamBlock Define

A block of sound data (i.e. audio samples.) The size of this block of data is defined in the previous SoundStreamHead tag. It is used to download sound samples on a per frame basis instead of all at once.

2
20. DefineBitsLossless Define

A bitmap compressed using ZLIB (similar to the PNG format).

2
21. DefineBitsJPEG2 Define

Defines a complete JPEG image (includes the bit stream and the tables all in one thus enabling multiple tables to be used within the same SWF file).

Since Flash version 10, the data can also be set to a valid PNG or GIF89a. There is no need to specify the image format in the tag since the data describing the image includes the necessary information.

2
22. DefineShape2 Define

Brief Description: 

Define a simple geometric shape.

2
23. DefineButtonCxform Define

Setup a color transformation for a button.

2
24. Protect Define

Disable edition capabilities of the given SWF file. Though this doesn't need to be enforced by an SWF editor, it marks the file as being copyrighted in a way.

WARNING: this tag is only valid in Flash V2.x, V3.x, and V4.x, use the EnableDebugger instead in V5.x and EnableDebugger2 in V6.x and newer movies.

2
25. PathsArePostscript Define

The shape paths are defined as in postscript?

3
26. PlaceObject2 Define

Place, replace, remove an object in the current display list.

3
28. RemoveObject2 Display

Remove the object at the specified level. This tag should be used in movies version 3 and over since it compressed better than the standard RemoveObject tag. Note that a PlaceObject2 can also be used for this task.

3
29. SyncFrame Display

Tag used to synchronize the animation with the hardware.

3
31. FreeAll Define

Probably an action that would be used to clear everything out.

3
32. DefineShape3 Define

Brief Description: 

Define a simple geometric shape.

3
33. DefineText2 Define

Defines a text of characters displayed using a font. Transparency is supported with this tag.

3
34. DefineButton2 Define

Define an action button. Includes a color transformation. 

3
35. DefineBitsJPEG3 Define

Defines a complete JPEG image, i.e. a verbatim JPEG image file. The JPEG image is then followed by an alpha channel. Note that the alpha channel uses the Z-lib compression. Since Flash 10, the supported image formats are JPEG, PNG and GIF89a.

3
36. DefineBitsLossless2 Define

Defines an RGBA bitmap compressed using ZLIB (similar to the PNG format).

3
39. DefineSprite Define

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.

3
40. NameCharacter Define

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

3
41. ProductInfo Define

This tag defines information about the product used to generate the animation. The product identifier should be unique among all the products. The info includes a product identifier, a product edition, a major and minor version, a build number and the date of compilation. All of this information is all about the generator, not the output movie.

3
43. FrameLabel Define

Names a frame or anchor. This frame can later be referenced using this name.

3
45. SoundStreamHead2 Define

Declare a sound effect which will be interleaved with a movie data so as to be loaded over a network connection while being played.

3
46. DefineMorphShape Define

This is similar to a sprite with a simple morphing between two shapes.

3
47. GenerateFrame Define

This may have been something similar to a New in an action script and thus was removed later.

3
48. DefineFont2 Define

Define a list of glyphs using shapes and other font metric information.

3
49. GeneratorCommand Define

Gives some information about the tool which generated this SWF file and its version.

3
37. DefineEditText Define

An edit text enables the end users to enter text in a Flash window.

4
38. DefineVideo Define

Apparently, Macromedia did have a first attempt in supporting video on their platform. It looks, however, as if they reconsidered at that point in time.

4
50. DefineCommandObject Define

?

5
51. CharacterSet Define

It looks like this would have been some sort of DefineSprite extension... did not make it out either.

5
52. ExternalFont Define

It looks like accessing a system font was going to be another tag, but instead Macromedia made use of a flag in the existing DefineFont2 tag.

5
56. Export Define

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).

5
57. Import Define

Imports a list of definitions that are to be loaded from another movie. You can retrieve objects that were exported in the specified movie. You can have as many import as you like, though you should really only have one per referenced movie.

5
58. EnableDebugger Format

The data of this tag is an MD5 password like the EnableDebugger2 tag. When it exists and you know the password, you will be given the right to debug the movie with Flash V5.x and higher.

WARNING: this tag is only valid in Flash V5.x, use the EnableDebugger2 instead in V6.x and newer movies and Protect in older movies (V2.x, V3.x, and V4.x).

5
59. DoInitAction Action

Actions to perform the first time the following Show Frame tag is reached. All the initialization actions are executed before any other actions. You have to specify a sprite to which the actions are applied to. Thus you don't need a set target action. When multiple initialization action blocks are within the same frame, they are executed one after another in the order they appear in that frame.

6
60. DefineVideoStream Define

Defines the necessary information for the player to display a video stream (i.e. size, codec, how to decode the data, etc.). Play the frames with VideoFrame tags.

6
61. VideoFrame Define

Show the specified video frame of a movie.

6
62. DefineFontInfo2 Define

Defines information about a font, like the DefineFontInfo tag plus a language reference. To force the use of a given language, this tag should be used in v6.x+ movies instead of the DefineFontInfo tag.

6
63. DebugID Define

This tag is used when debugging an SWF movie. It gives information about what debug file to load to match the SWF movie with the source. The identifier is a UUID.

6
64. EnableDebugger2 Format

The data of this tag is a 16 bits word followed by an MD5 password like the EnableDebugger tag. When it exists and you know the password, you will be given the right to debug the movie with Flash V6.x and over.

WARNING: this tag is only valid in Flash V6.x and over, use the EnableDebugger instead in V5.x and Protect in older movies (V2.x, V3.x, and V4.x).

6
65. ScriptLimits Define

Change limits used to ensure scripts do not use more resources than what you choose. In version 7, it supports a maximum recursive depth and a maximum amount of time scripts can be run for in seconds.

7
66. SetTabIndex Define

Define the order index so the player knows where to go next when the Tab key is pressed by the user.

7
69. FileAttributes Format

Since version 8, this tag is required and needs to be the very first tag in the movie. It is used as a way to better handle security within the Flash Player.

8
70. PlaceObject3 Display

Place an object in the display list. The object can include bitmap caching information, a blend mode and a set of filters.

8
71. Import2 Define

Imports a list of definitions from another movie. In version 8+, this tag replaces the original Import tag. You can retrieve objects which were exported in the specified movie. You can have as many import as you like, although you should really only have one per referenced movie.

8
73. DefineFontAlignZones Define

Define advanced hints about a font glyphs to place them on a pixel boundary.

8
74. CSMTextSettings Define

Define whether CSM text should be used in a previous DefineText, DefineText2 or DefineEditText.

8
75. DefineFont3 Define

Define a list of glyphs using shapes and other font metric information.

8
77. Metadata Format

This tag includes XML code describing the movie. The format is RDF compliant to the XMP as defined on W3C.

8
78. DefineScalingGrid Define

Define scale factors for a window, a button, or other similar objects.

8
83. DefineShape4 Define

Declare a shape which supports new line caps, scaling and fill options.

8
84. DefineMorphShape2 Define

Declare a morphing shape with attributes supported by version 8+.

8
72. DoABCDefine Action

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

9
76. SymbolClass Action

Instantiate objects from a set of classes.

9
82. DoABC Action

New container tag for ActionScripts under SWF 9. Includes an identifier, a name and actions.

9
86. DefineSceneAndFrameData Define

Define raw data for scenes and frames.

9
87. DefineBinaryData Define

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

9
88. DefineFontName Define

Define the legal font name and copyright.

9
90. DefineBitsJPEG4 Define

Defines a complete JPEG (the image formats supported are JPEG, PNG and GIF89a) and includes a deblocking filter parameter. The JPEG image is then followed by an alpha channel. Note that the alpha channel uses the Z-lib compression.

10

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 ...

SWF File Format Reference

The Flash File Format Explained

The SWF file format is used for Flash. SWF stands for Shockwave Format1, the very first company that created the Flash animation format later bought by Macromedia and now owned by Adobe.

The following book is an attempt in describing the binary file ...

  • 1. There are many people who found other names for the acronym such as Shockwave Flash, Shock Wave File, Small Web Format, Serious Wow Factor, and SWIFF. History of man kind is confronted with the same problems, unfortunately. And no... it really has nothing to do with the Swiss Wrestling Federation!

Terms & Conditions

Made to Order Software Corporation
Terms and Conditions for the Online Services
offered by Made to Order Software Corporation

This Agreement ("Agreement") is by and between Made to Order Software Corporation ("m2osw") a Californian Corporation and You, your heirs, your agents, successors and assigns ("You" and "Your"), and is made effective as of the date of electronic execution, which is when you register for an electronic account to use the Web site of m2osw. This Agreement sets forth the terms and conditions of Your use of the Online Services ...

Problems with Taxonomy VTN and their solution

The following are different problems you may encounter whenever you work with Taxonomy VTN. Those problems usually  have a work around and the following pages tell you about the solutions available to you.

Press Kit

Find high quality Made to Order Software Corporation logos and pictures below. Feel free to contact us if there is anything that you need and you cannot find it on this page.

Our latest press releases are available in our online press room.

Note: whenever the image is not marked with Alpha, there is a solid color background, usually white.