
=head1 NAME

SWF::Element - Classes of SWF tags and elements.

=head1 SYNOPSIS

  use SWF::Element;
  use SWF::BinStream;

  $swf_stream=SWF::BinStream::Write;
  ....
  $rect=SWF::Element::RECT->new;
  $rect->configure(Xmin=>0, Ymin=>0, Xmax=>100, Ymax=>100);
  $rect->pack($swf_stream);
  ....

=head1 DESCRIPTION

I<SWF::Element> module handles SWF tags and any other sub elements
to create, configure, clone, pack to bit strings, and unpack from bit strings.

=head2 SWF::Element::*

I<SWF::Element> class is a base class of SWF element, such as Tag, RECT, SHAPE, etc.
Each SWF::Element object has one or more fields.  Each field is also SWF::Element object.

=head3 METHODS

=over 4

=item $element=SWF::Element::* ->new([parameters]);

creates a new element. The new element is configured with parameters.

=item $element->clone;

duplicates the element.

=item $element->configure( [name[=>value, ...]] );

gets and sets fields of the element.

When calling without any parameter, the method returns all field names and values of the element as hash.

When calling with a field name, the method returns the field value of the element.

When calling with one or more pair of name and value, the method sets the field of the element
and returns the element itself.
If I<value> is an array reference, recursively configure the field element.

=item $element->defined;

returns whether I<$element> is defined or not.
The I<$element> is I<NOT defined> if all of its field are not defined.

=item $element->dumper([\&outputsub, $indent]);

dumps the element as a perl script which can re-create the element.

=item $element->pack($stream);

writes the element to I<$stream> as bit string SWF format.
I<$stream> should be I<SWF::BinStream::Write> object.

=item $element->unpack($stream);

reads the bit string data from I<$stream> and unpack the element.
I<$stream> should be I<SWF::BinStream::Read> object.

=item $element->I<FieldName>([configure parameters...]);

Each field of I<$element> can access by field name. 
When calling without parameter, it returns the field object.
when calling with the same element object or the configure parameters
 of the field, it sets the field with the parameters and returns 
the field object.

=item $element->I<FlagName>([value]);

The element has some flag accessor if the element has the field which consists some flags.
When calling without value, it returns the flag value.
When calilng with the value, it sets proper bit(s) of the I<Flags> field with the value and returns the flag value.

=back

=head2 SWF::Element::Scalar and its derivatives

I<SWF::Element::Scalar> and its derivatives represent a field whose value is a scalar.
I<SWF::Element::Scalar> doesn't have pack/unpack methods, so
the parent element is responsible to pack/unpack it.
There are some derivative classes which has pack/unpack methods:

  SWF::Element::UI8/16/32 - 8/16/32 bits unsigned integer.
  SWF::Element::SI8/16/32 - 8/16/32 bits signed integer.
  SWF::Element::STRING    - null-terminated string.
  SWF::Element::PSTRING   - pascal type string (string with its length).
  SWF::Element::ID        - 16bit ID of SWF shapes, bipmaps, sounds, etc.
  SWF::Element::BinData   - Binary Data (described later).

When the object of these classes is used in expression, it is degraded to mere scalar.
So, you can handle a field value as a scalar.  For example:

  # to be transparent 
  $alpha = $color->Alpha;
  $alpha /= 2;
  $color->Alpha($alpha);

or

  $color->Alpha($color->Alpha / 2);

=head3 METHODS

I<SWF::Element::Scalar> has all methods of I<SWF::Element> except any
field/flag accessors.  Here described the difference.

=over 4

=item $scalar->configure([value])

gets and sets the object.
When calling without any parameter, the method returns the value of the object.
When calling with a value, the method sets the value to the object and returns the value.

=item $scalar->value

returns the value of the object.

=back

=head2 SWF::Element::BinData

represents a binary data.

=head3 METHODS

It has the same methods as I<SWF::Element::Scalar>.
The other methods are described here.

=over 4

=item $bindata->Length

returns the length of the data.

=item $bindata->add( string )

adds a string to the data.

=item $bindata->substr( offset [, length , [replace]] )

Extracts a substring out of the data.  It behaves similar to 
CORE::substr.

=item $bindata->save( file )

saves the data to the file.  It takes a file name or a file handle.

=item $bindata->load( file )

loads the data from the file. It takes a file name or a file handle.

=back

=head2 SWF::Element::Array::*

I<SWF::Element::Array> is a base class which represents an array of the SWF element.
The I<SWF::Element::Array> object is an array reference.

=head3 METHODS

I<SWF::Element::Array> has all methods of I<SWF::Element> except any
field/flag accessors.  Here described the difference.

=over 4

=item $array->configure( list... )

adds I<list> to the array.  Each element of the list must be a proper element object or an array reference.

=item $array->new_element

creates a proper new element for the array.
The new element is not add the array automatically.  You should do 'push @$array, $new' if you want to add
the new element.

=back

=head2 SUBCLASSES

Here is the list of all subclasses representing the SWF element.
'SWF::Element::' is omitted from each class name.
ex. RECT means SWF::Element::RECT class.
See 'SWF file reference' for further information about SWF elements and fields.
You can download the document from http://openswf.org/ .

=head3 Basic Types

=over 4

=item RGB / RGBA

represents a color without/with alpha channel.

  field    class
  Red      UI8
  Green    UI8
  Blue     UI8
  Alpha    UI8  - RGBA only 

=item RECT

represents a rectanglular region.

  field    class
  Xmin     Scalar
  Ymin     Scalar
  Xmax     Scalar
  Ymax     Scalar

=item MATRIX

represents a matrix for scale, rotation, and translation.

 field        class
 ScaleX       Scalar
 ScaleY       Scalar
 RotateSkew0  Scalar
 RotateSkew1  Scalar
 TranslateX   Scalar
 TranslateY   Scalar

There are three methods.

=over 4

=item $matrix->scale([xscale, [yscale]]);

scales up and down by I<xscale> and I<yscale> for X-axis and Y-axis, respectively.
If omitting I<yscale>, I<xscale> is used for both axis.

=item $matrix->moveto(x,y);

moves to (I<x>, I<y>).

=item $matrix->rotate(degree);

rotates I<degree> degree.

=back

=item CXFORM / CXFORMWITHALPHA

represents a color transform value.

 field          class
 RedMultTerm    Scalar
 GreenMultTerm  Scalar
 BlueMultTerm   Scalar
 AlphaMultTerm  Scalar  - CXFORMWITHALPHA only.
 RedAddTerm     Scalar
 GreenAddTerm   Scalar
 BlueAddTerm    Scalar
 AlphaAddTerm   Scalar  - CXFORMWITHALPHA only.

=back

=head3 SWF Tags

=over 4

=item Tag

A base class of all SWF tags.

=over 4

=item $tag->tag_number

returns the tag ID number.

=back

=item Tag::Unidentified

is an I<empty> tag object.
When it is unpacked from SWF stream, it is re-blessed the proper tag class.

=item Tag::Undefined

represents the undefined tags.

 field  class
 Data   BinData

=back

=head4 Shapes

=over 4

=item Array::FILLSTYLEARRAY1 / 2 / 3

An array of fill styles.
FILLSTYLEARRAY1 and 2 have FILLSTYLE1, and FILLSTYLEARRAY3 has FILLSTYLE3.

=item FILLSTYLE1 / 3

represents fill style of shapes.
FILLSTYLE3 has alpha channels in its field elements.

 field           class
 FillStyleType   UI8
 Color           RGB / RGBA
 GradientMatrix  MATRIX
 Gradient        Array::GRADIENT1 / 3
 BitmapID        ID
 BitmapMatrix    MATRIX

=item Array::GRADIENT1 / 3

represents a gradient information.
Each of them is an array of GRADRECORD1 / 3.

=item GRADRECORD1 / 3

represents one of the colors making gradient.
GRADRECORD3 has an alpha channel.

 field  class
 Ratio  UI8
 Color  RGB / RGBA

=item Array::LINESTYLEARRAY1 / 2 / 3

An array of line styles.
LINESTYLEARRAY1 and 2 have LINESTYLE1, and LINESTYLEARRAY3 has LINESTYLE3.

=item LINESTYLE1 / 3

represents a line style of shapes.
LINESTYLE3 has an alpha channel.

 field  class
 Width  UI16
 Color  RGB / RGBA

=item SHAPE1 / 2 / 3

represents a shape without styles.
SHAPE3 has alpha channels.

 field         class
 ShapeRecords  Array::SHAPERECARRAY1 / 2 / 3 

=item SHAPEWITHSTYLE1 / 2 / 3

represents a shape with styles.
SHAPEWITHSTYLE3 has alpha channels.

 field         class
 FillStyles    Array::FILLSTYLEARRAY1 / 2 / 3
 LineStyles    Array::LINESTYLEARRAY1 / 2 / 3
 ShapeRecords  Array::SHAPERECARRAY1 / 2 / 3 

=item Array::SHAPERECARRAY1 / 2 / 3

An array of SHAPEREC1 / 2 / 3.

=item SHAPEREC1 / 2 / 3

is a base class of the edges of a shape.
If you configure this element, the element is re-blessed with proper 
subclass.

=item SHAPEREC1/2/3::NEWSHAPE

represents a start point and style of new edge.

 field       class
 MoveX       Scalar
 MoveY       Scalar
 Fill0Style  Scalar
 Fill1Style  Scalar
 LineStyle   Scalar
 FillStyles  Array::FILLSTYLEARRAY1 / 2 / 3
 LineStyles  Array::LINESTYLEARRAY1 / 2 / 3

=item SHAPERECn::STRAIGHTEDGE

represents an straight edge.
This is common subclass of SHAPEREC1/2/3.

 field class
 X     Scalar
 Y     Scalar

=item SHAPERECn::CURVEDEDGE

represents an curved edge.
This is common subclass of SHAPEREC1/2/3.

 field     class
 ControlX  Scalar
 ControlY  Scalar
 AnchorX   Scalar
 AnchorY   Scalar

=item Tag::DefineShape / Tag::DefineShape2 / Tag::DefineShape3

defines shape. DefineShape2/3 can have more than 255 styles.
DefineShape3 contains alpha channels.

 field        class
 ShapeID      ID
 ShapeBounds  RECT
 Shapes       SHAPEWITHSTYLE1 / 2 / 3

=item Tag::DefineMorphShape

defines the metamorphosis of one shape (Shape1) into another (Shape2).

 field            class
 CharacterID      ID
 ShapeBounds1     RECT
 ShapeBounds2     RECT
 MorphFillStyles  Array::MORPHFILLSTYLEARRAY
 MorphLineStyles  Array::MORPHLINESTYLEARRAY
 Edges1           SHAPE3
 Edges2           SHAPE3

=item Array::MORPHFILLSTYLEARRAY

An array of MORPHFILLSTYLE.

=item MORPHFILLSTYLE

represents fill styles for DefineMorphShape tag.

 field            class
 FillStyleType    UI8
 Color1           RGBA
 Color2           RGBA
 GradientMatrix1  MATRIX
 GradientMatrix2  MATRIX
 Gradient         Array::MORPHGRADIENT
 BitmapID         ID
 BitmapMatrix1    MATRIX
 BitmapMatrix2    MATRIX

=item Array::MORPHGRADIENT

An array of MORPHGRADRECORD.

=item MORPHGRADRECORD

represents one of the colors making gradient for DefineMorphShape.

 field   class
 Ratio1  UI8
 Color1  RGBA
 Ratio2  UI8
 Color2  RGBA

=item Array::MORPHLINESTYLEARRAY

An array of MORPHLINESTYLE.

=item MORPHLINESTYLE

represents a line style of shapes for DefineMorphShape.

 field   class
 Width1  UI16
 Color1  RGBA
 Width2  UI16
 Color2  RGBA

=back

=head4 Bitmaps

=over 4

=item Tag::DefineBits

defines JPEG image data.

 field            class
 BitmapID         ID
 BitmapJPEGImage  BinData

=item Tag::DefineBitsJPEG2 / 3

defines JPEG image data and an encoding table.
DefineBitsJPEG3 has an alpha data table.

 field               class
 BitmapID            ID
 BitmapJPEGEncoding  BinData
 BitmapJPEGImage     BinData
 BitmapAlphaData     BinData - JPEG3 only.

=item Tag::DefineBitsLossless / Tag::DefineBitsLossless2

defines a loss-less bitmap.
DefineBitsLossless2 contains alpha channels.

 field                 class
 BitmapID              ID
 BitmapFormat          UI8
 BitmapWidth           UI16
 BitmapHeight          UI16
 BitmapColorTableSize  UI8
 CompressedData        BinData

=item Tag::JPEGTable

defines JPEG encoding table.

 field               class
 BitmapJPEGEncoding  BinData

=back

=head4 Buttons

=over 4

=item Tag::Definebutton

defines a button character.

 field     class
 ButtonID  ID
 Buttons   Array::BUTTONRECORDARRAY1
 Actions   Array::ACTIONRECORDARRAY

=item Tag::DefineButton2

defines a button character.

 field                   class
 ButtonID                ID
 Flags                   UI8
 Buttons                 Array::BUTTONRECORDARRAY2
 Button2ActionCondition  Array::ACTIONCONDITIONARRAY

=item Array::BUTTONRECORDARRAY1 / 2

An array of BUTTONRECORD1 / 2.

=item BUTTONRECORD1 / 2

represents a button character and associated button states.

 field           class
 ButtonStates    UI8
   StateHitTest  (ButtonStates)
   StateDown     (ButtonStates)
   StateUp       (ButtonStates)
   StateOver     (ButtonStates)
 ButtonCharacter UI16
 ButtonLayer     UI16
 ButtonMatrix    MATRIX
 ColorTransform  CXFORMWITHALPHA - only BUTTONRECORD2

=item Array::ACTIONCONDITIONARRAY

An array of ACTIONCONDITION.

=item ACTIONCONDITION

represents actions and a button states condition which triggers off the actions.

 field                class
 Condition            UI16
   IdleToOverUp       (Condition)
   OverUpToIdle       (Condition)
   OverUpToOverDown   (Condition)
   OverDownToOverUp   (Condition)
   OverDownToOutDown  (Condition)
   OutDownToOverDown  (Condition)
   OutDownToIdle      (Condition)
   IdleToOverDown     (Condition)
   OverDownToIdle     (Condition)
 Actions              Array::ACTIONRECORDARRAY

=item Tag::DefineButtonCxform

defines the color transform for each shape and text character in a button.

 field                 class
 ButtonID              ID
 ButtonColorTransform  CXFORM

=item Tag::DefineButtonSound

defines the sound data for a button.

 field             class
 ButtonID          ID
 ButtonSoundChar0  ID
 ButtonSoundInfo0  SOUNDINFO
 ButtonSoundChar1  ID
 ButtonSoundInfo1  SOUNDINFO
 ButtonSoundChar2  ID
 ButtonSoundInfo2  SOUNDINFO
 ButtonSoundChar3  ID
 ButtonSoundInfo3  SOUNDINFO

=back

=head4 Fonts and Text

=over 4

=item Tag::DefineFont

defines font glyphs.

 field       class
 FontID      ID
 ShapeTable  SHAPEARRAY1

=item Array::SHAPEARRAY1 / 2

An array of SHAPE1 / 2.

=item Tag::DefineFont2

defines font glyphs and other information.

 field                class
 FontID               ID
 FontFlags            UI16
   FontFlagsBold      (FontFlags)
   FontFlagsItalic    (FontFlags)
   FontFlagsANSI      (FontFlags)
   FontFlagsUnicode   (FontFlags)
   FontFlagsShiftJIS  (FontFlags)
 FontName              PSTRING
 FontShapeTable        Array::SHAPEARRAY2
 FontCodeTable         Array::FONTCODETABLE
 FontAscent            SI16
 FontDescent           SI16
 FontLeading           SI16
 FontAdvanceTable      Array::FONTADVANCETABLE
 FontBoundsTable       Array::FONTBOUNDSTABLE
 FontKerningTable      FONTKERNINGTABLE

=item Array::FONTCODETABLE / FONTADVANCETABLE / FONTBOUNDSTABLE

are arrays of a code, an advance value, and a bounding box of each glyph corresponding to the shape table, respectively.
A code and an advance value are scalar, and a bounding box is a RECT.

=item FONTKERNINGTABLE

represents a table of kerning pairs of the font. 
Each kerning pair is described as 'code1-code2'. 
For example, a pair of 'T'(code 84) and 'o'(111) is '84-111'.

=over 4

=item $kern->configure([ pair [=> adjustment, ...]])

When calling without any parameter, it returns all kerning pair and its adjustment.
When calling with a kerning pair, it returns the adjustment of the pair.
When calling with the list of a kerning pair and its adjustment, it adds the kerning data to the table.

=back

=item Tag::DefineFontInfo

defines font information.

 field                class
 FontID               ID
 FontName             PSTRING
 FontFlags            UI8
   FontFlagsBold      (FontFlags)
   FontFlagsItalic    (FontFlags)
   FontFlagsANSI      (FontFlags)
   FontFlagsUnicode   (FontFlags)
   FontFlagsShiftJIS  (FontFlags)
 FontCodeTable        Array::FONTCODETABLE

=item Tag::DefineText / Tag::DefineText2

defines text.

 field         class
 TextID        ID
 TextBounds    RECT
 TextMatrix    MATRIX
 TextRecords   Array::TEXTRECORDARRAY1 / 2

=item Array::TEXTRECORDARRAY1 / 2

An array of TEXTRECORD1 / 2

=item TEXTRECORD1 / 2

A base class of text records.
If you configure this element, the element is re-blessed with proper 
subclass.

=item TEXTRECORD::Type0

represents a text string.

 field         class
 GlyphEntries  Array:GLYPHENTRYARRAY

=item Array::GLYPHENTRYARRAY

An array of GLYPHENTRY.

=item GLYPHENTRY

represents a glyph entry for a letter of the text.

 field             class
 TextGlyphIndex    Scalar
 TextGlyphAdvance  Scalar 

=item TEXTRECORD1/2::Type1

represents a text style.

 field        class
 TextFont     ID
 TextColor    RGB  / RGBA
 TextXOffset  SI16
 TextYOffset  SI16
 TextHeight   UI16

=item Tag::DefineEditText

defines an edit box.

 field             class
 TextFieldID       ID
 TextFieldBounds   RECT
 Flags             UI16
   FlagReadOnly    (Flags)
   FlagPassword    (Flags)
   FlagMultiline   (Flags)
   FlagWordWrap    (Flags)
   FlagUseOutlines (Flags)
 FontID            ID
 FontHeight        UI16
 TextColor         RGBA
 MaxLength         UI16
 Align             UI8
 LeftMargin        UI16
 RightMargin       UI16
 Indent            UI16
 Leading           UI16
 Variable          STRING
 InitialText       STRING

=back

=head4 Sounds

=over 4

=item SOUNDINFO

represents sound information.

 field            class
 SyncFlags        Scalar
 InPoint          UI32
 OutPoint         UI32
 LoopCount        UI16
 EnvelopeRecords  Array::SNDENVARRAY

=item Array::SNDENVARRAY

An array of SNDENV.

=item SNDENV

represents sound envelope information.

 field   class
 Mark44  UI32
 Level0  UI16
 Level1  UI16

=item Tag::DefineSound

defines sound.

 field             class
 SoundID           ID
 Flags             UI8
   SoundFormat     (Flags)
   SoundRate       (Flags)
   SoundSize       (Flags)
   SoundType       (Flags)
 SoundSampleCount  UI32
 SoundData         BinData

=item Tag::SoundStreamBlock

defines streaming sound.

 field            class
 StreamsoundData  BinData

=item Tag::SoundStreamHead / Tag::SoundStreamHead2

defines the start of streaming sound.

 field                   class
 StreamSoundMixFormat    UI8
 Flags                   UI8
   SoundFormat           (Flags)
   SoundRate             (Flags)
   SoundSize             (Flags)
   SoundType             (Flags)
 StreamSoundSampleCount  UI16

=back

=head4 Sprites

=over 4

=item Tag::DefineSprite

defines a sprite.

 field              class
 SpriteID           ID
 FrameCount         UI6
 MiniFileStructure  Bindata

=back

=head4 Display List

=over 4

=item Tag::PlaceObject

places the object.

 field           class
 CharacterID     ID
 Depth           UI16
 Matrix          MATRIX
 ColorTransform  CXFORM

=item Tag::PlaceObject2

places the object.

 field           class
 Flags           UI8
   HasMove       (Flags)
 Depth           UI16
 CharacterID     ID
 Matrix          MATRIX
 ColorTramsform  CXFORMWITHALPHA
 Ratio           UI16
 ClipDepth       UI16
 Name            STRING
 EventActions    Array::EVENTACTIONARRAY

=item Array::EVENTACTIONARRAY

An array of EVENTACTION.

=item EVENTACTION

represents an event and frame actions triggered by it.

 field        class
 Flags        UI16
   OnLoad     (Flags)
   EnterFrame (Flags)
   Unload     (Flags)
   MouseMove  (Flags)
   MouseDown  (Flags)
   MouseUp    (Flags)
   KeyDown    (Flags)
   KeyUp      (Flags)
   Data       (Flags)
 Action       Array::ACTIONBLOCK2

=item Tag::RemoveObject / Tag::RemoveObject2

removes the object.

 field        class
 CharacterID  ID    - RemoveObject only
 Depth        UI16

=item Tag::ShowFrame

shows current frame.

=back

=head4 Controls

=over 4

=item Tag::BackgroundColor

sets the background color.

 field            class
 BackgroundColor  RGB

=item Tag::FrameLabel

sets the frame label.

 field  class
 Label  STRING

=item Tag::FreeCharacter

frees the character.

 field        class
 CharacterID  ID

=item Tag::NameCharacter

names the character.

 field        class
 CharacterID  ID
 Name         STRING

=item Tag::Protect

prevents the file from editing in the authoring tool.

 field     class
 Password  BinData

=item Tag::StartSound

starts playing sound.

 field      class
 SoundID    ID
 SoundInfo  SOUNDINFO

=item Tag::End

marks the end of the file.

=item Tag::ExportAssets

 field   class
 Assets  Array::ASSETARRAY

=item Tag::ImportAssets

 field   class
 Assets  Array::ASSETARRAY

=item Array::ASSETARRAY

An array of ASSET.

=item ASSET

 field   class
 ID      UI16
 String  STRING

=back

=head4 Actions

=over 4

=item Tag::DoAction

performs the action.

 field    class
 Actions  Array::ACTIONRECORDARRAY

=item Array::ACTIONRECORDARRAY

An array of ACTIONRECORD

=item ACTIONRECORD

represents action tags without any parameter.

 field  class
 Tag    ACTIONTagNumber

=item ACTIONTagNumber

represents an action tag number or name.

=item ACTIONRECORD::ActionUndefined

represents an undefined actiontag.

 field  class
 Tag    ACTIONTagNumber
 Data   BinData

=item ACTIONRECORD::ActionGotoFrame

goes to the specified frame.

 field  class
 Tag    ACTIONTagNumber
 Frame  UI16

=item ACTIONRECORD::ActionGetURL

directs the player to get the specified URL.

 field      class
 Tag        ACTIONTagNumber
 URLString  STRING
 WinString  STRING

=item ACTIONRECORD::ActionWaitForFrame

waits until the specified frame otherwise skip the specified number of actions.

 field      class
 Tag        ACTIONTagNumber
 Frame      UI16
 SkipCount  UI8

=item ACTIONRECORD::ActionSetTarget

sets context of action.

 field       class
 Tag         ACTIONTagNumber
 TargetName  STRING

=item ACTIONRECORD::ActionGotoLabel

goes to frame associated with the specified label.

 field  class
 Tag    ACTIONTagNumber
 Label  STRING

=item ACTIONRECORD::WaitForFrame2

waits until the frame specified in the stack otherwise skip the specified number of actions.

 field      class
 Tag        ACTIONTagNumber
 SkipCount  UI8

=item ACTIONRECORD::PushData

pushes data to the stack.

 field     class
 Tag       ACTIONTagNumber
 DataList  Array::ACTIONDATAARRAY

=item Array::ACTIONDATAARRAY

An array of ACTIONDATA

=item ACTIONDATA

A base class of data for action script.
If you configure this element, the element is re-blessed with proper 
subclass.

=over 4

=item $actiondata->configure([type => data])

sets the data and re-blessed itself to the type.
Types are String, Property (FLASH 4 only), Register, Boolean, Double, Integer, Lookup.

=back

=item ACTIONRECORD::BranchAlways / BranchIfTrue

branches action script always / if stack top is true.

 field   class
 Offset  UI16

=item ACTIONRECORD::GetURL2

directs the player to get the URL specified in the stack.

 field   class
 Tag     ACTIONTagNumber
 Method  UI8

=item ACTIONRECORD::ActionGotoFrame2

goes to the frame specified in the stack.

 field  class
 Tag    ACTIONTagNumber
 Flag   UI8

=item ACTIORECORD::ActionDefineDictionary

defines word set which can be referred by index.

 field  class
 Tag    ActionTagNumber
 Words  Array::WORDARRAY

=item Array::WORDARRAY

an array of STRING.

=item ACTIONRECORD::ActionDefineFunction

defines a function.

 field     class
 Tag       ActionTagNumber
 Name      STRING
 Args      Array::ACTIONFUNCARGS
 Function  Array::ACTIONBLOCK

=item Array::ACTIONFUNCARGS

An array of STRING.

=item Array::ACTIONBLOCK / Array::ACTIONBLOCK2

an array of ACTIONRECORD.

=item ACTIONRECORD::ActionStoreRegister

stores the stack top to the register.

 field     class
 Tag       ActionTagNumber
 Register  UI8

=item ACTIONRECORD::ActionWith

refers to the object on the top of stack for the member and the method
written in the I<WithBlock>, like 'With' statement of Visual Basic.

 field      class
 WithBlock  Array::ACTIONBLOCK

=back

=head1 COPYRIGHT

Copyright 2000 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>

This library is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.

=head1 SEE ALSO

L<SWF::BinStream>, L<SWF::Parser>

SWF file format and SWF file reference in SWF SDK.


=cut

