pt.tumba.parser.swf
Class ActionParser

java.lang.Object
  extended by pt.tumba.parser.swf.ActionParser
All Implemented Interfaces:
SWFActionCodes

public class ActionParser
extends java.lang.Object
implements SWFActionCodes

Parse action bytes and drive a SWFActions interface

Author:
unknown

Nested Class Summary
protected static class ActionParser.ActionRecord
          Description of the Class
 
Field Summary
protected  SWFActions actions
          Description of the Field
protected  int blockDepth
          Description of the Field
 
Fields inherited from interface pt.tumba.parser.swf.SWFActionCodes
ADD, AND, ASCII_TO_CHAR, BIT_AND, BIT_OR, BIT_XOR, CALL, CALL_FUNCTION, CALL_METHOD, CALL_NEW_METHOD, CHAR_TO_ASCII, CLONE_SPRITE, CONVERT_TO_NUMBER, CONVERT_TO_STRING, DECREMENT, DEFINE_FUNCTION, DEFINE_LOCAL, DEFINE_LOCAL_VAL, DEL_THREAD_VARS, DEL_VAR, DIVIDE, DUPLICATE, END_DRAG, ENUMERATE, EQUALS, GET_MEMBER, GET_PROPERTY, GET_TARGET_PATH, GET_TIME, GET_URL, GET_URL_2, GET_VARIABLE, GOTO_FRAME, GOTO_FRAME_2, GOTO_LABEL, IF, INCREMENT, INIT_ARRAY, INIT_OBJECT, JUMP, LESS, LOOKUP_TABLE, MB_ASCII_TO_CHAR, MB_CHAR_TO_ASCII, MB_STRING_EXTRACT, MB_STRING_LENGTH, MODULO, MULTIPLY, NEW_OBJECT, NEXT_FRAME, NOT, OR, PLAY, POP, PREVIOUS_FRAME, PROP_ALPHA, PROP_CURRENTFRAME, PROP_DROPTARGET, PROP_FOCUSRECT, PROP_FRAMESLOADED, PROP_HEIGHT, PROP_HIGHQUALITY, PROP_NAME, PROP_QUALITY, PROP_ROTATION, PROP_SOUNDBUFTIME, PROP_TARGET, PROP_TOTALFRAMES, PROP_URL, PROP_VISIBLE, PROP_WIDTH, PROP_X, PROP_XMOUSE, PROP_XSCALE, PROP_Y, PROP_YMOUSE, PROP_YSCALE, PUSH, PUSHTYPE_03, PUSHTYPE_BOOLEAN, PUSHTYPE_DOUBLE, PUSHTYPE_FLOAT, PUSHTYPE_INTEGER, PUSHTYPE_LOOKUP, PUSHTYPE_NULL, PUSHTYPE_REGISTER, PUSHTYPE_STRING, RANDOM_NUMBER, REGISTER, REMOVE_SPRITE, RETURN, SET_MEMBER, SET_PROPERTY, SET_TARGET, SET_TARGET_2, SET_VARIABLE, SHIFT_LEFT, SHIFT_RIGHT, SHIFT_UNSIGNED, START_DRAG, STOP, STOP_SOUNDS, STRING_ADD, STRING_EQUALS, STRING_EXTRACT, STRING_LENGTH, STRING_LESS, SUBTRACT, SWAP, TO_INTEGER, TOGGLE_QUALITY, TRACE, TYPED_ADD, TYPED_EQUALS, TYPED_LESS_THAN, TYPEOF, TYPEOF_BOOLEAN, TYPEOF_FUNCTION, TYPEOF_MOVIECLIP, TYPEOF_NULL, TYPEOF_NUMBER, TYPEOF_OBJECT, TYPEOF_STRING, TYPEOF_UNDEFINED, WAIT_FOR_FRAME, WAIT_FOR_FRAME_2, WITH
 
Constructor Summary
ActionParser(SWFActions actions)
          Constructor for the ActionParser object
 
Method Summary
protected  java.util.List createRecords(byte[] bytes)
          First Pass to determine action offsets and jumps
protected  java.util.List createRecords(InStream in)
          First Pass to determine action offsets and jumps
 void parse(byte[] bytes)
          Description of the Method
 void parse(InStream in)
          Description of the Method
protected  void parseDefineFunction(InStream in)
          Description of the Method
protected  void parseGetURL2(int flags)
          Description of the Method
protected  void parseLookupTable(InStream in)
          Description of the Method
protected  void parsePush(int length, InStream in)
          Description of the Method
protected  void parseWith(InStream in)
          Description of the Method
protected  void processRecords(java.util.List records)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

protected SWFActions actions
Description of the Field


blockDepth

protected int blockDepth
Description of the Field

Constructor Detail

ActionParser

public ActionParser(SWFActions actions)
Constructor for the ActionParser object

Parameters:
actions - Description of the Parameter
Method Detail

parse

public void parse(byte[] bytes)
           throws java.io.IOException
Description of the Method

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

parse

public void parse(InStream in)
           throws java.io.IOException
Description of the Method

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

processRecords

protected void processRecords(java.util.List records)
                       throws java.io.IOException
Description of the Method

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

parseDefineFunction

protected void parseDefineFunction(InStream in)
                            throws java.io.IOException
Description of the Method

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

parseWith

protected void parseWith(InStream in)
                  throws java.io.IOException
Description of the Method

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

parseLookupTable

protected void parseLookupTable(InStream in)
                         throws java.io.IOException
Description of the Method

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

parseGetURL2

protected void parseGetURL2(int flags)
                     throws java.io.IOException
Description of the Method

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

parsePush

protected void parsePush(int length,
                         InStream in)
                  throws java.io.IOException
Description of the Method

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

createRecords

protected java.util.List createRecords(byte[] bytes)
                                throws java.io.IOException
First Pass to determine action offsets and jumps

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

createRecords

protected java.util.List createRecords(InStream in)
                                throws java.io.IOException
First Pass to determine action offsets and jumps

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