pt.tumba.parser.swf
Interface SWFTagTypes

All Superinterfaces:
SWFHeader, SWFSpriteTagTypes, SWFTags
All Known Implementing Classes:
FontLoader, MovieBuilder, SWF2HTML, SWFSaxParser, SWFTagDumper, SWFTagTypesImpl, TagWriter

public interface SWFTagTypes
extends SWFSpriteTagTypes

Interface for passing SWF tag types.

Author:
unknown

Method Summary
 void tagButtonCXForm(int buttonId, ColorTransform transform)
          Description of the Method
 void tagDefineBits(int id, byte[] imageData)
          JPEG image data only - header/encoding data is in tagJPEGTables tag
 void tagDefineBitsJPEG2(int id, byte[] data)
           
 void tagDefineBitsJPEG2(int id, java.io.InputStream jpegImage)
           
 void tagDefineBitsJPEG3(int id, byte[] imageData, byte[] alphaData)
          JPEG image and encoding data with alpha channel bitmap
 void tagDefineBitsLossless(int id, int format, int width, int height, Color[] colors, byte[] imageData)
           
 void tagDefineBitsLossless2(int id, int format, int width, int height, Color[] colors, byte[] imageData)
           
 SWFActions tagDefineButton(int id, java.util.List buttonRecords)
           
 SWFActions tagDefineButton2(int id, boolean trackAsMenu, java.util.List buttonRecord2s)
           
 void tagDefineButtonSound(int buttonId, int rollOverSoundId, SoundInfo rollOverSoundInfo, int rollOutSoundId, SoundInfo rollOutSoundInfo, int pressSoundId, SoundInfo pressSoundInfo, int releaseSoundId, SoundInfo releaseSoundInfo)
          Define the sound for a button
 SWFVectors tagDefineFont(int id, int numGlyphs)
          The SWFVectors object returned will be called numGlyphs times to pass the vector information for each glyph (each glyph is terminated by calling SWFVectors.done() )
 SWFVectors tagDefineFont2(int id, int flags, java.lang.String name, int numGlyphs, int ascent, int descent, int leading, int[] codes, int[] advances, Rect[] bounds, int[] kernCodes1, int[] kernCodes2, int[] kernAdjustments)
          Description of the Method
 void tagDefineFontInfo(int fontId, java.lang.String fontName, int flags, int[] codes)
           
 SWFShape tagDefineMorphShape(int id, Rect startBounds, Rect endBounds)
          Description of the Method
 void tagDefineQuickTimeMovie(int id, java.lang.String filename)
          Description of the Method
 SWFShape tagDefineShape(int id, Rect outline)
           
 SWFShape tagDefineShape2(int id, Rect outline)
           
 SWFShape tagDefineShape3(int id, Rect outline)
           
 void tagDefineSound(int id, int format, int frequency, boolean bits16, boolean stereo, int sampleCount, byte[] soundData)
           
 SWFTagTypes tagDefineSprite(int id)
          Description of the Method
 SWFText tagDefineText(int id, Rect bounds, Matrix matrix)
           
 SWFText tagDefineText2(int id, Rect bounds, Matrix matrix)
          Allows alpha colors
 void tagDefineTextField(int fieldId, java.lang.String fieldName, java.lang.String initialText, Rect boundary, int flags, AlphaColor textColor, int alignment, int fontId, int fontSize, int charLimit, int leftMargin, int rightMargin, int indentation, int lineSpacing)
           
 void tagEnableDebug(byte[] password)
          Description of the Method
 void tagExport(java.lang.String[] names, int[] ids)
          Description of the Method
 void tagGenerator(byte[] data)
          In Generator templates.
 void tagGeneratorCommand(byte[] data)
          In Generator templates.
 void tagGeneratorFont(byte[] data)
          In Generator templates.
 void tagGeneratorText(byte[] data)
          In Generator templates.
 void tagImport(java.lang.String movieName, java.lang.String[] names, int[] ids)
          Description of the Method
 void tagJPEGTables(byte[] jpegEncodingData)
          Only one tag per SWF - holds common JPEG encoding data
 void tagNameCharacter(byte[] data)
          In Generator templates.
 void tagProtect(byte[] password)
           
 void tagSerialNumber(java.lang.String serialNumber)
          In files produced by Generator...
 void tagSetBackgroundColor(Color color)
          Description of the Method
 
Methods inherited from interface pt.tumba.parser.swf.SWFSpriteTagTypes
tagDoAction, tagEnd, tagFrameLabel, tagFreeCharacter, tagPlaceObject, tagPlaceObject2, tagRemoveObject, tagRemoveObject2, tagShowFrame, tagSoundStreamBlock, tagSoundStreamHead, tagSoundStreamHead2, tagStartSound
 
Methods inherited from interface pt.tumba.parser.swf.SWFTags
tag
 
Methods inherited from interface pt.tumba.parser.swf.SWFHeader
header
 

Method Detail

tagDefineSound

void tagDefineSound(int id,
                    int format,
                    int frequency,
                    boolean bits16,
                    boolean stereo,
                    int sampleCount,
                    byte[] soundData)
                    throws java.io.IOException
Parameters:
format - one of the SWFConstants.SOUND_FORMAT_* constants
frequency - one of the SWFConstants.SOUND_FREQ_* constants
soundData - format-dependent sound data
id - Description of the Parameter
bits16 - Description of the Parameter
stereo - Description of the Parameter
sampleCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineButtonSound

void tagDefineButtonSound(int buttonId,
                          int rollOverSoundId,
                          SoundInfo rollOverSoundInfo,
                          int rollOutSoundId,
                          SoundInfo rollOutSoundInfo,
                          int pressSoundId,
                          SoundInfo pressSoundInfo,
                          int releaseSoundId,
                          SoundInfo releaseSoundInfo)
                          throws java.io.IOException
Define the sound for a button

Parameters:
buttonId - Description of the Parameter
rollOverSoundId - Description of the Parameter
rollOverSoundInfo - Description of the Parameter
rollOutSoundId - Description of the Parameter
rollOutSoundInfo - Description of the Parameter
pressSoundId - Description of the Parameter
pressSoundInfo - Description of the Parameter
releaseSoundId - Description of the Parameter
releaseSoundInfo - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineShape

SWFShape tagDefineShape(int id,
                        Rect outline)
                        throws java.io.IOException
Parameters:
id - Description of the Parameter
outline - Description of the Parameter
Returns:
SWFShape to receive shape info - or null to skip the data
Throws:
java.io.IOException - Description of the Exception

tagDefineShape2

SWFShape tagDefineShape2(int id,
                         Rect outline)
                         throws java.io.IOException
Parameters:
id - Description of the Parameter
outline - Description of the Parameter
Returns:
SWFShape to receive shape info - or null to skip the data
Throws:
java.io.IOException - Description of the Exception

tagDefineShape3

SWFShape tagDefineShape3(int id,
                         Rect outline)
                         throws java.io.IOException
Parameters:
id - Description of the Parameter
outline - Description of the Parameter
Returns:
SWFShape to receive shape info - or null to skip the data
Throws:
java.io.IOException - Description of the Exception

tagDefineButton

SWFActions tagDefineButton(int id,
                           java.util.List buttonRecords)
                           throws java.io.IOException
Parameters:
buttonRecords - contains ButtonRecord objects
id - Description of the Parameter
Returns:
SWFActions object (may be null) to receive button actions - there is only one action array (with no conditions).
Throws:
java.io.IOException - Description of the Exception
See Also:
com.anotherbigidea.flash.structs.ButtonRecord

tagButtonCXForm

void tagButtonCXForm(int buttonId,
                     ColorTransform transform)
                     throws java.io.IOException
Description of the Method

Parameters:
buttonId - Description of the Parameter
transform - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineButton2

SWFActions tagDefineButton2(int id,
                            boolean trackAsMenu,
                            java.util.List buttonRecord2s)
                            throws java.io.IOException
Parameters:
buttonRecord2s - contains ButtonRecord2 objects
id - Description of the Parameter
trackAsMenu - Description of the Parameter
Returns:
SWFActions object (may be null) to receive button actions - there may be multiple action arrays - each one is conditional, using the BUTTON2_* condition flags defined in SWFConstants.java
Throws:
java.io.IOException - Description of the Exception
See Also:
com.anotherbigidea.flash.structs.ButtonRecord2

tagSetBackgroundColor

void tagSetBackgroundColor(Color color)
                           throws java.io.IOException
Description of the Method

Parameters:
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineFont

SWFVectors tagDefineFont(int id,
                         int numGlyphs)
                         throws java.io.IOException
The SWFVectors object returned will be called numGlyphs times to pass the vector information for each glyph (each glyph is terminated by calling SWFVectors.done() )

Parameters:
id - Description of the Parameter
numGlyphs - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineText

SWFText tagDefineText(int id,
                      Rect bounds,
                      Matrix matrix)
                      throws java.io.IOException
Parameters:
id - Description of the Parameter
bounds - Description of the Parameter
matrix - Description of the Parameter
Returns:
SWFText object to receive the text style and glyph information - this may be null if the info is not required
Throws:
java.io.IOException - Description of the Exception

tagDefineText2

SWFText tagDefineText2(int id,
                       Rect bounds,
                       Matrix matrix)
                       throws java.io.IOException
Allows alpha colors

Parameters:
id - Description of the Parameter
bounds - Description of the Parameter
matrix - Description of the Parameter
Returns:
SWFText object to receive the text style and glyph information - this may be null if the info is not required
Throws:
java.io.IOException - Description of the Exception

tagDefineFontInfo

void tagDefineFontInfo(int fontId,
                       java.lang.String fontName,
                       int flags,
                       int[] codes)
                       throws java.io.IOException
Parameters:
flags - see FONT_* constants in SWFConstants.java
fontId - Description of the Parameter
fontName - Description of the Parameter
codes - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsJPEG2

void tagDefineBitsJPEG2(int id,
                        byte[] data)
                        throws java.io.IOException
Parameters:
data - must contain the header data - use the InputStream version when using an external JPEG
id - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsJPEG2

void tagDefineBitsJPEG2(int id,
                        java.io.InputStream jpegImage)
                        throws java.io.IOException
Parameters:
jpegImage - must be a baseline JPEG (not a progressive JPEG)
id - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBits

void tagDefineBits(int id,
                   byte[] imageData)
                   throws java.io.IOException
JPEG image data only - header/encoding data is in tagJPEGTables tag

Parameters:
id - Description of the Parameter
imageData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagJPEGTables

void tagJPEGTables(byte[] jpegEncodingData)
                   throws java.io.IOException
Only one tag per SWF - holds common JPEG encoding data

Parameters:
jpegEncodingData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsJPEG3

void tagDefineBitsJPEG3(int id,
                        byte[] imageData,
                        byte[] alphaData)
                        throws java.io.IOException
JPEG image and encoding data with alpha channel bitmap

Parameters:
alphaData - is zlib compressed
id - Description of the Parameter
imageData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsLossless

void tagDefineBitsLossless(int id,
                           int format,
                           int width,
                           int height,
                           Color[] colors,
                           byte[] imageData)
                           throws java.io.IOException
Parameters:
format - one of the SWFConstants.BITMAP_FORMAT_n_BIT constants
id - Description of the Parameter
width - Description of the Parameter
height - Description of the Parameter
colors - Description of the Parameter
imageData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsLossless2

void tagDefineBitsLossless2(int id,
                            int format,
                            int width,
                            int height,
                            Color[] colors,
                            byte[] imageData)
                            throws java.io.IOException
Parameters:
format - one of the SWFConstants.BITMAP_FORMAT_n_BIT constants
id - Description of the Parameter
width - Description of the Parameter
height - Description of the Parameter
colors - Description of the Parameter
imageData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagProtect

void tagProtect(byte[] password)
                throws java.io.IOException
Parameters:
password - may be null
Throws:
java.io.IOException - Description of the Exception

tagDefineTextField

void tagDefineTextField(int fieldId,
                        java.lang.String fieldName,
                        java.lang.String initialText,
                        Rect boundary,
                        int flags,
                        AlphaColor textColor,
                        int alignment,
                        int fontId,
                        int fontSize,
                        int charLimit,
                        int leftMargin,
                        int rightMargin,
                        int indentation,
                        int lineSpacing)
                        throws java.io.IOException
Parameters:
flags - see TEXTFIELD_* constants in SWFConstants.java
fieldId - Description of the Parameter
fieldName - Description of the Parameter
initialText - Description of the Parameter
boundary - Description of the Parameter
textColor - Description of the Parameter
alignment - Description of the Parameter
fontId - Description of the Parameter
fontSize - Description of the Parameter
charLimit - Description of the Parameter
leftMargin - Description of the Parameter
rightMargin - Description of the Parameter
indentation - Description of the Parameter
lineSpacing - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineQuickTimeMovie

void tagDefineQuickTimeMovie(int id,
                             java.lang.String filename)
                             throws java.io.IOException
Description of the Method

Parameters:
id - Description of the Parameter
filename - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineSprite

SWFTagTypes tagDefineSprite(int id)
                            throws java.io.IOException
Description of the Method

Parameters:
id - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineMorphShape

SWFShape tagDefineMorphShape(int id,
                             Rect startBounds,
                             Rect endBounds)
                             throws java.io.IOException
Description of the Method

Parameters:
id - Description of the Parameter
startBounds - Description of the Parameter
endBounds - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineFont2

SWFVectors tagDefineFont2(int id,
                          int flags,
                          java.lang.String name,
                          int numGlyphs,
                          int ascent,
                          int descent,
                          int leading,
                          int[] codes,
                          int[] advances,
                          Rect[] bounds,
                          int[] kernCodes1,
                          int[] kernCodes2,
                          int[] kernAdjustments)
                          throws java.io.IOException
Description of the Method

Parameters:
id - Description of the Parameter
flags - Description of the Parameter
name - Description of the Parameter
numGlyphs - Description of the Parameter
ascent - Description of the Parameter
descent - Description of the Parameter
leading - Description of the Parameter
codes - Description of the Parameter
advances - Description of the Parameter
bounds - Description of the Parameter
kernCodes1 - Description of the Parameter
kernCodes2 - Description of the Parameter
kernAdjustments - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagExport

void tagExport(java.lang.String[] names,
               int[] ids)
               throws java.io.IOException
Description of the Method

Parameters:
names - Description of the Parameter
ids - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagImport

void tagImport(java.lang.String movieName,
               java.lang.String[] names,
               int[] ids)
               throws java.io.IOException
Description of the Method

Parameters:
movieName - Description of the Parameter
names - Description of the Parameter
ids - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagEnableDebug

void tagEnableDebug(byte[] password)
                    throws java.io.IOException
Description of the Method

Parameters:
password - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagSerialNumber

void tagSerialNumber(java.lang.String serialNumber)
                     throws java.io.IOException
In files produced by Generator...

Parameters:
serialNumber - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGenerator

void tagGenerator(byte[] data)
                  throws java.io.IOException
In Generator templates. Data is not parsed.

Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGeneratorText

void tagGeneratorText(byte[] data)
                      throws java.io.IOException
In Generator templates. Data is not parsed.

Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGeneratorCommand

void tagGeneratorCommand(byte[] data)
                         throws java.io.IOException
In Generator templates. Data is not parsed.

Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagNameCharacter

void tagNameCharacter(byte[] data)
                      throws java.io.IOException
In Generator templates. Data is not parsed.

Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGeneratorFont

void tagGeneratorFont(byte[] data)
                      throws java.io.IOException
In Generator templates. Data is not parsed.

Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception