Flash Tutorials - Herong's Tutorial Examples
∟SWF File Structure and Tags
∟SWF File Definition and Control Tags
This section describes SWF file definition tags for defining shapes, bitmaps, text, sound, audio streams, video streams buttons, etc., and control tags for changing overall settings, building and rendering playlists, and defining and running actions.
At a high level SWF file tags can be divided into 2 categories:
- Definition Tags - Define the content of the SWF file, the shapes, text, bitmaps, sounds,
and so on. Each definition tag assigns a unique ID called a character ID to the content it defines.
Flash Player then stores the character in a repository called the dictionary. Definition tags, by themselves,
do not cause anything to be rendered.
- Control Tags - Create and manipulate rendered instances of characters in the dictionary, and
control the flow of the file.
Definition tags can be divided further into the following subcategories:
- Shap Definition Tags (DEFINESHAPE, DEFINESHAPE2, DEFINESHAPE3, DEFINESHAPE4, ...) -
A shap definition tag defines a character representing a 2D graphical shape like a circle, a rectangular, or other shape with
various line styles and fill styles.
- Bitmap Definition Tags (DEFINEBITS, DEFINEBITSJPEG2, DEFINEBITSJPEG3, DEFINEBITSLOSSLESS, DEFINEBITSLOSSLESS2, DEFINEBITSJPEG4, ...) -
A bitmap definition tag defines a character representing an image with various image compression algorithms.
- Morph Shape Definition Tags (DEFINEMORPHSHAPE, DEFINEMORPHSHAPE2) -
A morph shape definition tag defines a character represents a morph process between a starting shape and an ending shape.
- Text and Font Definition Tags (DEFINETEXT, DEFINEEDITTEXT, DEFINEFONT, DEFINEFONT2, DEFINEFONT3, ...) -
A font definition tag defines a character representing a text font.
A text definition tag defines a character representing a static or a dynamic text string.
- Event Sound Definition Tag (DEFINESOUND) -
An event sound definition tag defines a character representing an event sound,
which can be played in response to some event such as a mouse click, or when Flash Player reaches
a certain frame.
- Stream Sound Definition Tags (SOUNDSTREAMHEAD, SOUNDSTREAMHEAD2, ...) -
A stream sound definition tag defines a character representing a stream sound,
which can be played sequentially when it is retrieved from its source.
- Video Definition Tag (DEFINEVIDEOSTREAM) -
A video definition tag defines a character representing a video,
which is a sequences of video images and can rendered sequentially when it is retrieved from its source.
- Binary Data Definition Tag (DEFINEBINARYDATA) -
A binary data definition tag defines a character representing a video,
which is a sequences of video images and can rendered sequentially when it is retrieved from its source.
- Sprite (Movie Clip) Definition Tag (DEFINESPRITE) -
A sprite definition tag defines a character representing a sprite,
which is a child SWF file and be executed in parallel with the parent SWF file.
- Button Definition Tag (DEFINEBUTTON, DEFINEBUTTON2, ...) -
A button definition tag defines a character representing a button,
which can be used for the viewer to interact with the SWF file.
Control tags can also be divided into 3 subcategories:
- Overall Control Tags (SETBACKGROUNDCOLOR, FRAMELABEL, PROTECT, END, EXPORTASSETS, IMPORTASSETS, FILEATTRIBUTES, ...) -
A overall control tag changes an overall behavior of the SWF file.
- Play List Control Tags (PLACEOBJECT, PLACEOBJECT2, PLACEOBJECT3, REMOVEOBJECT, REMOVEOBJECT2, SHOWFRAME, ...) -
A display list control tag creates an instance of character from the dictionary and places it in the playlist,
removes an instance of character, or renders all character instances in the playlist on the current frame.
- Action Control Tags (DOACTION, DOABC) -
An action control tag defines a set (action list) of action instructions or action byte codes
to be executed by the Flash Player when SHOWFRAME is reached.
Examples of action instructions are Play, Stop, NextFrame, PreviousFrame, GotoFrame, GoToLabel, WaitForFrame, GetURL, StopSounds, ...
Table of Contents
About This Book
Introduction of Adobe Flash
Adobe Flash Player Plugin for Firefox
Adobe Flash Player Plugin for Chrome
Adobe Flash Player Plugin for Safari
Adobe Flash Player ActiveX for IE
Using "object" Elements for Flash Files
Using "embed" Elements for Flash Files
"mp3player" - MP3 Music Player
SWFObject - Hidding "object" behind JavaScript
Flash Player Projector
SWFTools - SWF File Manipulation Tools
SWFC Script to Generate Flash SWF Files
ActionScript Embedded in SWFC Script
AS3Compile - ActionScript 3 Compiler
Adobe Flex SDK 4
►SWF File Structure and Tags
What Is SWF?
SWF File Structure
SWF File Example - rectangle.swf
SWF File Example - Dump Output
►SWF File Definition and Control Tags
SWF File Processing Rules
SWF Files for Video and Audio Streams
Outdated Tutorials
References
Full Version in PDF/EPUB