pt.tumba.parser.swf
Class SWFTagDumper

java.lang.Object
  extended by pt.tumba.parser.swf.SWFTagDumper
All Implemented Interfaces:
SWFHeader, SWFShape, SWFSpriteTagTypes, SWFTags, SWFTagTypes, SWFText, SWFVectors

public class SWFTagDumper
extends java.lang.Object
implements SWFTagTypes, SWFShape, SWFText

An implementation of the SWFTagTypes interface that produces a debug dump

Author:
unknown

Field Summary
protected  java.lang.String dashes
          Description of the Field
protected  boolean decompileActions
          Description of the Field
protected  boolean dumpHex
          Description of the Field
protected  java.lang.String indent
          Description of the Field
protected  java.io.PrintWriter writer
          Description of the Field
 
Constructor Summary
SWFTagDumper(boolean dumpHex, boolean decompileActions)
          Dump to System.out
SWFTagDumper(java.io.OutputStream out, boolean dumpHex, boolean decompileActions)
          Dump to the given output stream
SWFTagDumper(java.io.PrintWriter writer, boolean dumpHex, boolean decompileActions)
          Constructor for the SWFTagDumper object
 
Method Summary
 void color(Color color)
          SWFText interface
 void curve(int cx, int cy, int dx, int dy)
          SWFVectors interface
 void defineFillStyle(Color color)
          SWFShape interface
 void defineFillStyle(int bitmapId, Matrix matrix, boolean clipped)
          SWFShape interface
 void defineFillStyle(Matrix matrix, int[] ratios, Color[] colors, boolean radial)
          SWFShape interface
 void defineLineStyle(int width, Color color)
          SWFShape interface
 void done()
          SWFVectors interface SWFText interface
 void dumpBitsLossless(java.lang.String name, int id, int format, int width, int height, Color[] colors, byte[] imageData)
          Description of the Method
 void flush()
          Description of the Method
 void font(int fontId, int textHeight)
          SWFText interface
 void header(int version, long length, int twipsWidth, int twipsHeight, int frameRate, int frameCount)
          SWFHeader interface.
 void line(int dx, int dy)
          SWFVectors interface
static void main(java.lang.String[] args)
          args[0] = name of SWF file to dump to System.out args[1] = if exists then dump-hex is true (dumps binary as hex - otherwise skips) args[2] = if exists then decompiles action codes
 void move(int x, int y)
          SWFVectors interface
protected  void println(java.lang.String line)
          Description of the Method
 void printSoundStreamHead(java.lang.String name, int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount)
          Description of the Method
 void setFillStyle0(int styleIndex)
          SWFShape interface
 void setFillStyle1(int styleIndex)
          SWFShape interface
 void setLineStyle(int styleIndex)
          SWFShape interface
 void setX(int x)
          SWFText interface
 void setY(int y)
          SWFText interface
 void tag(int tagType, boolean longTag, byte[] contents)
          SWFTags interface
 void tagButtonCXForm(int buttonId, ColorTransform transform)
          SWFTagTypes interface
 void tagDefineBits(int id, byte[] imageData)
          SWFTagTypes interface
 void tagDefineBitsJPEG2(int id, byte[] data)
          SWFTagTypes interface
 void tagDefineBitsJPEG2(int id, java.io.InputStream jpegImage)
          SWFTagTypes interface
 void tagDefineBitsJPEG3(int id, byte[] imageData, byte[] alphaData)
          SWFTagTypes interface
 void tagDefineBitsLossless(int id, int format, int width, int height, Color[] colors, byte[] imageData)
          SWFTagTypes interface
 void tagDefineBitsLossless2(int id, int format, int width, int height, Color[] colors, byte[] imageData)
          SWFTagTypes interface
 SWFActions tagDefineButton(int id, java.util.List buttonRecords)
          SWFTagTypes interface
 SWFActions tagDefineButton2(int id, boolean trackAsMenu, java.util.List buttonRecord2s)
          SWFTagTypes interface
 void tagDefineButtonSound(int buttonId, int rollOverSoundId, SoundInfo rollOverSoundInfo, int rollOutSoundId, SoundInfo rollOutSoundInfo, int pressSoundId, SoundInfo pressSoundInfo, int releaseSoundId, SoundInfo releaseSoundInfo)
          SWFTagTypes interface
 SWFVectors tagDefineFont(int id, int numGlyphs)
          SWFTagTypes interface
 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)
          SWFTagTypes interface
 void tagDefineFontInfo(int fontId, java.lang.String fontName, int flags, int[] codes)
          SWFTagTypes interface
 SWFShape tagDefineMorphShape(int id, Rect startBounds, Rect endBounds)
          SWFTagTypes interface
 void tagDefineQuickTimeMovie(int id, java.lang.String filename)
          SWFTagTypes interface
 SWFShape tagDefineShape(int id, Rect outline)
          SWFTagTypes interface
 SWFShape tagDefineShape2(int id, Rect outline)
          SWFTagTypes interface
 SWFShape tagDefineShape3(int id, Rect outline)
          SWFTagTypes interface
 void tagDefineSound(int id, int format, int frequency, boolean bits16, boolean stereo, int sampleCount, byte[] soundData)
          SWFTagTypes interface
 SWFTagTypes tagDefineSprite(int id)
          SWFTagTypes interface
 SWFText tagDefineText(int id, Rect bounds, Matrix matrix)
          SWFTagTypes interface
 SWFText tagDefineText2(int id, Rect bounds, Matrix matrix)
          SWFTagTypes interface
 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)
          SWFTagTypes interface
 SWFActions tagDoAction()
          SWFTagTypes interface
 void tagEnableDebug(byte[] password)
          SWFTagTypes interface
 void tagEnd()
          SWFTagTypes interface
 void tagExport(java.lang.String[] names, int[] ids)
          SWFTagTypes interface
 void tagFrameLabel(java.lang.String label)
          SWFTagTypes interface
 void tagFreeCharacter(int charId)
          SWFTagTypes interface
 void tagGenerator(byte[] data)
          SWFTagTypes interface
 void tagGeneratorCommand(byte[] data)
          SWFTagTypes interface
 void tagGeneratorFont(byte[] data)
          SWFTagTypes interface
 void tagGeneratorText(byte[] data)
          SWFTagTypes interface
 void tagImport(java.lang.String movieName, java.lang.String[] names, int[] ids)
          SWFTagTypes interface
 void tagJPEGTables(byte[] jpegEncodingData)
          SWFTagTypes interface
 void tagNameCharacter(byte[] data)
          SWFTagTypes interface
 void tagPlaceObject(int charId, int depth, Matrix matrix, AlphaTransform cxform)
          SWFTagTypes interface
 SWFActions tagPlaceObject2(boolean isMove, int clipDepth, int depth, int charId, Matrix matrix, AlphaTransform cxform, int ratio, java.lang.String name, int clipActionFlags)
          SWFTagTypes interface
 void tagProtect(byte[] password)
          SWFTagTypes interface
 void tagRemoveObject(int charId, int depth)
          SWFTagTypes interface
 void tagRemoveObject2(int depth)
          SWFTagTypes interface
 void tagSerialNumber(java.lang.String serialNumber)
          SWFTagTypes interface
 void tagSetBackgroundColor(Color color)
          SWFTagTypes interface
 void tagShowFrame()
          SWFTagTypes interface
 void tagSoundStreamBlock(byte[] soundData)
          SWFTagTypes interface
 void tagSoundStreamHead(int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount)
          SWFTagTypes interface
 void tagSoundStreamHead2(int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount)
          SWFTagTypes interface
 void tagStartSound(int soundId, SoundInfo info)
          SWFTagTypes interface
 void text(int[] glyphIndices, int[] glyphAdvances)
          SWFText interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected java.io.PrintWriter writer
Description of the Field


dashes

protected java.lang.String dashes
Description of the Field


dumpHex

protected boolean dumpHex
Description of the Field


indent

protected java.lang.String indent
Description of the Field


decompileActions

protected boolean decompileActions
Description of the Field

Constructor Detail

SWFTagDumper

public SWFTagDumper(boolean dumpHex,
                    boolean decompileActions)
Dump to System.out

Parameters:
dumpHex - if true then binary data will dumped as hex - otherwise skipped
decompileActions - Description of the Parameter

SWFTagDumper

public SWFTagDumper(java.io.OutputStream out,
                    boolean dumpHex,
                    boolean decompileActions)
Dump to the given output stream

Parameters:
dumpHex - if true then binary data will dumped as hex - otherwise skipped
out - Description of the Parameter
decompileActions - Description of the Parameter

SWFTagDumper

public SWFTagDumper(java.io.PrintWriter writer,
                    boolean dumpHex,
                    boolean decompileActions)
Constructor for the SWFTagDumper object

Parameters:
writer - Description of the Parameter
dumpHex - Description of the Parameter
decompileActions - Description of the Parameter
Method Detail

println

protected void println(java.lang.String line)
Description of the Method

Parameters:
line - Description of the Parameter

tag

public void tag(int tagType,
                boolean longTag,
                byte[] contents)
         throws java.io.IOException
SWFTags interface

Specified by:
tag in interface SWFTags
Parameters:
tagType - Description of the Parameter
longTag - Description of the Parameter
contents - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

header

public void header(int version,
                   long length,
                   int twipsWidth,
                   int twipsHeight,
                   int frameRate,
                   int frameCount)
            throws java.io.IOException
SWFHeader interface.

Specified by:
header in interface SWFHeader
Parameters:
version - Description of the Parameter
length - Description of the Parameter
twipsWidth - Description of the Parameter
twipsHeight - Description of the Parameter
frameRate - Description of the Parameter
frameCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagEnd

public void tagEnd()
            throws java.io.IOException
SWFTagTypes interface

Specified by:
tagEnd in interface SWFSpriteTagTypes
Throws:
java.io.IOException - Description of the Exception

tagStartSound

public void tagStartSound(int soundId,
                          SoundInfo info)
                   throws java.io.IOException
SWFTagTypes interface

Specified by:
tagStartSound in interface SWFSpriteTagTypes
Parameters:
soundId - Description of the Parameter
info - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagSoundStreamHead

public void tagSoundStreamHead(int playbackFrequency,
                               boolean playback16bit,
                               boolean playbackStereo,
                               int streamFormat,
                               int streamFrequency,
                               boolean stream16bit,
                               boolean streamStereo,
                               int averageSampleCount)
                        throws java.io.IOException
SWFTagTypes interface

Specified by:
tagSoundStreamHead in interface SWFSpriteTagTypes
Parameters:
playbackFrequency - Description of the Parameter
playback16bit - Description of the Parameter
playbackStereo - Description of the Parameter
streamFormat - Description of the Parameter
streamFrequency - Description of the Parameter
stream16bit - Description of the Parameter
streamStereo - Description of the Parameter
averageSampleCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagSoundStreamHead2

public void tagSoundStreamHead2(int playbackFrequency,
                                boolean playback16bit,
                                boolean playbackStereo,
                                int streamFormat,
                                int streamFrequency,
                                boolean stream16bit,
                                boolean streamStereo,
                                int averageSampleCount)
                         throws java.io.IOException
SWFTagTypes interface

Specified by:
tagSoundStreamHead2 in interface SWFSpriteTagTypes
Parameters:
playbackFrequency - Description of the Parameter
playback16bit - Description of the Parameter
playbackStereo - Description of the Parameter
streamFormat - Description of the Parameter
streamFrequency - Description of the Parameter
stream16bit - Description of the Parameter
streamStereo - Description of the Parameter
averageSampleCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

printSoundStreamHead

public void printSoundStreamHead(java.lang.String name,
                                 int playbackFrequency,
                                 boolean playback16bit,
                                 boolean playbackStereo,
                                 int streamFormat,
                                 int streamFrequency,
                                 boolean stream16bit,
                                 boolean streamStereo,
                                 int averageSampleCount)
                          throws java.io.IOException
Description of the Method

Parameters:
name - Description of the Parameter
playbackFrequency - Description of the Parameter
playback16bit - Description of the Parameter
playbackStereo - Description of the Parameter
streamFormat - Description of the Parameter
streamFrequency - Description of the Parameter
stream16bit - Description of the Parameter
streamStereo - Description of the Parameter
averageSampleCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagSoundStreamBlock

public void tagSoundStreamBlock(byte[] soundData)
                         throws java.io.IOException
SWFTagTypes interface

Specified by:
tagSoundStreamBlock in interface SWFSpriteTagTypes
Parameters:
soundData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagSerialNumber

public void tagSerialNumber(java.lang.String serialNumber)
                     throws java.io.IOException
SWFTagTypes interface

Specified by:
tagSerialNumber in interface SWFTagTypes
Parameters:
serialNumber - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGenerator

public void tagGenerator(byte[] data)
                  throws java.io.IOException
SWFTagTypes interface

Specified by:
tagGenerator in interface SWFTagTypes
Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGeneratorText

public void tagGeneratorText(byte[] data)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagGeneratorText in interface SWFTagTypes
Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGeneratorFont

public void tagGeneratorFont(byte[] data)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagGeneratorFont in interface SWFTagTypes
Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagGeneratorCommand

public void tagGeneratorCommand(byte[] data)
                         throws java.io.IOException
SWFTagTypes interface

Specified by:
tagGeneratorCommand in interface SWFTagTypes
Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagNameCharacter

public void tagNameCharacter(byte[] data)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagNameCharacter in interface SWFTagTypes
Parameters:
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBits

public void tagDefineBits(int id,
                          byte[] imageData)
                   throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineBits in interface SWFTagTypes
Parameters:
id - Description of the Parameter
imageData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagJPEGTables

public void tagJPEGTables(byte[] jpegEncodingData)
                   throws java.io.IOException
SWFTagTypes interface

Specified by:
tagJPEGTables in interface SWFTagTypes
Parameters:
jpegEncodingData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsJPEG3

public void tagDefineBitsJPEG3(int id,
                               byte[] imageData,
                               byte[] alphaData)
                        throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineBitsJPEG3 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
imageData - Description of the Parameter
alphaData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineSound

public void tagDefineSound(int id,
                           int format,
                           int frequency,
                           boolean bits16,
                           boolean stereo,
                           int sampleCount,
                           byte[] soundData)
                    throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineSound in interface SWFTagTypes
Parameters:
id - Description of the Parameter
format - Description of the Parameter
frequency - Description of the Parameter
bits16 - Description of the Parameter
stereo - Description of the Parameter
sampleCount - Description of the Parameter
soundData - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineButtonSound

public void tagDefineButtonSound(int buttonId,
                                 int rollOverSoundId,
                                 SoundInfo rollOverSoundInfo,
                                 int rollOutSoundId,
                                 SoundInfo rollOutSoundInfo,
                                 int pressSoundId,
                                 SoundInfo pressSoundInfo,
                                 int releaseSoundId,
                                 SoundInfo releaseSoundInfo)
                          throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineButtonSound in interface SWFTagTypes
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

tagShowFrame

public void tagShowFrame()
                  throws java.io.IOException
SWFTagTypes interface

Specified by:
tagShowFrame in interface SWFSpriteTagTypes
Throws:
java.io.IOException - Description of the Exception

tagDoAction

public SWFActions tagDoAction()
                       throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDoAction in interface SWFSpriteTagTypes
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineShape

public SWFShape tagDefineShape(int id,
                               Rect outline)
                        throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineShape in interface SWFTagTypes
Parameters:
id - Description of the Parameter
outline - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineShape2

public SWFShape tagDefineShape2(int id,
                                Rect outline)
                         throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineShape2 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
outline - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineShape3

public SWFShape tagDefineShape3(int id,
                                Rect outline)
                         throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineShape3 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
outline - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagFreeCharacter

public void tagFreeCharacter(int charId)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagFreeCharacter in interface SWFSpriteTagTypes
Parameters:
charId - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagPlaceObject

public void tagPlaceObject(int charId,
                           int depth,
                           Matrix matrix,
                           AlphaTransform cxform)
                    throws java.io.IOException
SWFTagTypes interface

Specified by:
tagPlaceObject in interface SWFSpriteTagTypes
Parameters:
charId - Description of the Parameter
depth - Description of the Parameter
matrix - Description of the Parameter
cxform - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagPlaceObject2

public SWFActions tagPlaceObject2(boolean isMove,
                                  int clipDepth,
                                  int depth,
                                  int charId,
                                  Matrix matrix,
                                  AlphaTransform cxform,
                                  int ratio,
                                  java.lang.String name,
                                  int clipActionFlags)
                           throws java.io.IOException
SWFTagTypes interface

Specified by:
tagPlaceObject2 in interface SWFSpriteTagTypes
Parameters:
isMove - Description of the Parameter
clipDepth - Description of the Parameter
depth - Description of the Parameter
charId - Description of the Parameter
matrix - Description of the Parameter
cxform - Description of the Parameter
ratio - Description of the Parameter
name - Description of the Parameter
clipActionFlags - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagRemoveObject

public void tagRemoveObject(int charId,
                            int depth)
                     throws java.io.IOException
SWFTagTypes interface

Specified by:
tagRemoveObject in interface SWFSpriteTagTypes
Parameters:
charId - Description of the Parameter
depth - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagRemoveObject2

public void tagRemoveObject2(int depth)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagRemoveObject2 in interface SWFSpriteTagTypes
Parameters:
depth - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagSetBackgroundColor

public void tagSetBackgroundColor(Color color)
                           throws java.io.IOException
SWFTagTypes interface

Specified by:
tagSetBackgroundColor in interface SWFTagTypes
Parameters:
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagFrameLabel

public void tagFrameLabel(java.lang.String label)
                   throws java.io.IOException
SWFTagTypes interface

Specified by:
tagFrameLabel in interface SWFSpriteTagTypes
Parameters:
label - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineSprite

public SWFTagTypes tagDefineSprite(int id)
                            throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineSprite in interface SWFTagTypes
Parameters:
id - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagProtect

public void tagProtect(byte[] password)
                throws java.io.IOException
SWFTagTypes interface

Specified by:
tagProtect in interface SWFTagTypes
Parameters:
password - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagEnableDebug

public void tagEnableDebug(byte[] password)
                    throws java.io.IOException
SWFTagTypes interface

Specified by:
tagEnableDebug in interface SWFTagTypes
Parameters:
password - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineFont

public SWFVectors tagDefineFont(int id,
                                int numGlyphs)
                         throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineFont in interface SWFTagTypes
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

tagDefineFontInfo

public void tagDefineFontInfo(int fontId,
                              java.lang.String fontName,
                              int flags,
                              int[] codes)
                       throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineFontInfo in interface SWFTagTypes
Parameters:
fontId - Description of the Parameter
fontName - Description of the Parameter
flags - Description of the Parameter
codes - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineFont2

public 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
SWFTagTypes interface

Specified by:
tagDefineFont2 in interface SWFTagTypes
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

tagDefineTextField

public 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
SWFTagTypes interface

Specified by:
tagDefineTextField in interface SWFTagTypes
Parameters:
fieldId - Description of the Parameter
fieldName - Description of the Parameter
initialText - Description of the Parameter
boundary - Description of the Parameter
flags - 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

tagDefineText

public SWFText tagDefineText(int id,
                             Rect bounds,
                             Matrix matrix)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineText in interface SWFTagTypes
Parameters:
id - Description of the Parameter
bounds - Description of the Parameter
matrix - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineText2

public SWFText tagDefineText2(int id,
                              Rect bounds,
                              Matrix matrix)
                       throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineText2 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
bounds - Description of the Parameter
matrix - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineButton

public SWFActions tagDefineButton(int id,
                                  java.util.List buttonRecords)
                           throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineButton in interface SWFTagTypes
Parameters:
id - Description of the Parameter
buttonRecords - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception
See Also:
com.anotherbigidea.flash.structs.ButtonRecord

tagButtonCXForm

public void tagButtonCXForm(int buttonId,
                            ColorTransform transform)
                     throws java.io.IOException
SWFTagTypes interface

Specified by:
tagButtonCXForm in interface SWFTagTypes
Parameters:
buttonId - Description of the Parameter
transform - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineButton2

public SWFActions tagDefineButton2(int id,
                                   boolean trackAsMenu,
                                   java.util.List buttonRecord2s)
                            throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineButton2 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
trackAsMenu - Description of the Parameter
buttonRecord2s - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception
See Also:
com.anotherbigidea.flash.structs.ButtonRecord2

tagExport

public void tagExport(java.lang.String[] names,
                      int[] ids)
               throws java.io.IOException
SWFTagTypes interface

Specified by:
tagExport in interface SWFTagTypes
Parameters:
names - Description of the Parameter
ids - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagImport

public void tagImport(java.lang.String movieName,
                      java.lang.String[] names,
                      int[] ids)
               throws java.io.IOException
SWFTagTypes interface

Specified by:
tagImport in interface SWFTagTypes
Parameters:
movieName - Description of the Parameter
names - Description of the Parameter
ids - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineQuickTimeMovie

public void tagDefineQuickTimeMovie(int id,
                                    java.lang.String filename)
                             throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineQuickTimeMovie in interface SWFTagTypes
Parameters:
id - Description of the Parameter
filename - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsJPEG2

public void tagDefineBitsJPEG2(int id,
                               byte[] data)
                        throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineBitsJPEG2 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
data - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineBitsJPEG2

public void tagDefineBitsJPEG2(int id,
                               java.io.InputStream jpegImage)
                        throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineBitsJPEG2 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
jpegImage - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineMorphShape

public SWFShape tagDefineMorphShape(int id,
                                    Rect startBounds,
                                    Rect endBounds)
                             throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineMorphShape in interface SWFTagTypes
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

tagDefineBitsLossless

public void tagDefineBitsLossless(int id,
                                  int format,
                                  int width,
                                  int height,
                                  Color[] colors,
                                  byte[] imageData)
                           throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineBitsLossless in interface SWFTagTypes
Parameters:
id - Description of the Parameter
format - 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

public void tagDefineBitsLossless2(int id,
                                   int format,
                                   int width,
                                   int height,
                                   Color[] colors,
                                   byte[] imageData)
                            throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineBitsLossless2 in interface SWFTagTypes
Parameters:
id - Description of the Parameter
format - 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

dumpBitsLossless

public void dumpBitsLossless(java.lang.String name,
                             int id,
                             int format,
                             int width,
                             int height,
                             Color[] colors,
                             byte[] imageData)
                      throws java.io.IOException
Description of the Method

Parameters:
name - Description of the Parameter
id - Description of the Parameter
format - 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

done

public void done()
          throws java.io.IOException
SWFVectors interface SWFText interface

Specified by:
done in interface SWFText
Specified by:
done in interface SWFVectors
Throws:
java.io.IOException - Description of the Exception

line

public void line(int dx,
                 int dy)
          throws java.io.IOException
SWFVectors interface

Specified by:
line in interface SWFVectors
Parameters:
dx - Description of the Parameter
dy - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

curve

public void curve(int cx,
                  int cy,
                  int dx,
                  int dy)
           throws java.io.IOException
SWFVectors interface

Specified by:
curve in interface SWFVectors
Parameters:
cx - Description of the Parameter
cy - Description of the Parameter
dx - Description of the Parameter
dy - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

move

public void move(int x,
                 int y)
          throws java.io.IOException
SWFVectors interface

Specified by:
move in interface SWFVectors
Parameters:
x - Description of the Parameter
y - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

setFillStyle0

public void setFillStyle0(int styleIndex)
                   throws java.io.IOException
SWFShape interface

Specified by:
setFillStyle0 in interface SWFShape
Parameters:
styleIndex - The new fillStyle0 value
Throws:
java.io.IOException - Description of the Exception

setFillStyle1

public void setFillStyle1(int styleIndex)
                   throws java.io.IOException
SWFShape interface

Specified by:
setFillStyle1 in interface SWFShape
Parameters:
styleIndex - The new fillStyle1 value
Throws:
java.io.IOException - Description of the Exception

setLineStyle

public void setLineStyle(int styleIndex)
                  throws java.io.IOException
SWFShape interface

Specified by:
setLineStyle in interface SWFShape
Parameters:
styleIndex - The new lineStyle value
Throws:
java.io.IOException - Description of the Exception

defineFillStyle

public void defineFillStyle(Color color)
                     throws java.io.IOException
SWFShape interface

Specified by:
defineFillStyle in interface SWFShape
Parameters:
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

defineFillStyle

public void defineFillStyle(Matrix matrix,
                            int[] ratios,
                            Color[] colors,
                            boolean radial)
                     throws java.io.IOException
SWFShape interface

Specified by:
defineFillStyle in interface SWFShape
Parameters:
matrix - Description of the Parameter
ratios - Description of the Parameter
colors - Description of the Parameter
radial - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

defineFillStyle

public void defineFillStyle(int bitmapId,
                            Matrix matrix,
                            boolean clipped)
                     throws java.io.IOException
SWFShape interface

Specified by:
defineFillStyle in interface SWFShape
Parameters:
bitmapId - Description of the Parameter
matrix - Description of the Parameter
clipped - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

defineLineStyle

public void defineLineStyle(int width,
                            Color color)
                     throws java.io.IOException
SWFShape interface

Specified by:
defineLineStyle in interface SWFShape
Parameters:
width - Description of the Parameter
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

font

public void font(int fontId,
                 int textHeight)
          throws java.io.IOException
SWFText interface

Specified by:
font in interface SWFText
Parameters:
fontId - Description of the Parameter
textHeight - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

color

public void color(Color color)
           throws java.io.IOException
SWFText interface

Specified by:
color in interface SWFText
Parameters:
color - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

setX

public void setX(int x)
          throws java.io.IOException
SWFText interface

Specified by:
setX in interface SWFText
Parameters:
x - The new x value
Throws:
java.io.IOException - Description of the Exception

setY

public void setY(int y)
          throws java.io.IOException
SWFText interface

Specified by:
setY in interface SWFText
Parameters:
y - The new y value
Throws:
java.io.IOException - Description of the Exception

text

public void text(int[] glyphIndices,
                 int[] glyphAdvances)
          throws java.io.IOException
SWFText interface

Specified by:
text in interface SWFText
Parameters:
glyphIndices - Description of the Parameter
glyphAdvances - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

flush

public void flush()
           throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
args[0] = name of SWF file to dump to System.out args[1] = if exists then dump-hex is true (dumps binary as hex - otherwise skips) args[2] = if exists then decompiles action codes

Parameters:
args - The command line arguments
Throws:
java.io.IOException - Description of the Exception