|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<BasicAction>
com.flagstone.transform.action.BasicAction
public enum BasicAction
BasicAction represents all the actions that can be encoded using a single byte-code. Where appropriate the description for an action contains a simple example showing the order of arguments on the stack and any result: e.g. 3, 2 -> 1. Here 3 and 2 are the numbers on the stack with 2 being the top-most. When the action is executed the numbers are popped off and the result to the right of the arrow is the result is pushed onto the stack.
FSPush is used to push literals onto the Stack. See also FSRegisterCopy which copies the value on top of the Stack to one of the Flash Player's internal registers.
Arithmetic add is supported by two actions. INTEGER_ADD was introduced in Flash 4. It was replaced in Flash 5 by the more flexible ADD action which is able to add any two numbers and also concatenate strings. If a string and a number are added then the number is converted to its string representation before concatenation.
For comparison, Flash 4 introduced INTEGER_LESS and INTEGER_EQUALS for comparing numbers and STRING_LESS and STRING_EQUALS for comparing strings. They were superseded in Flash 5 by LESS and EQUALS which work with either strings or numbers.
| Enum Constant Summary | |
|---|---|
ADD
Add two numbers. |
|
ARITH_SHIFT_RIGHT
Arithmetically shift a number right. |
|
ASCII_TO_CHAR
Convert the ASCII value to the equivalent character. |
|
BITWISE_AND
Bitwise and tow numbers. |
|
BITWISE_OR
Bitwise or tow numbers. |
|
BITWISE_XOR
Bitwise exclusive-or two numbers. |
|
CAST
Casts the type of an object. |
|
CHAR_TO_ASCII
Convert the first character of a string to its ASCII value. |
|
CLONE_SPRITE
Duplicate a movie clip on the display list. |
|
DECREMENT
Decrement a number. |
|
DELETE
Delete an object or variable. |
|
DELETE_VARIABLE
Delete a variable. |
|
DIVIDE
Divide two numbers. |
|
DUPLICATE
Duplicate the value at the top of the stack. |
|
END
Signals the end of a list of actions. |
|
END_DRAG
Stop dragging the mouse. |
|
ENUMERATE
Enumerate through the attributes of an object. |
|
ENUMERATE_OBJECT
Enumerate through the attributes of an object. |
|
EQUALS
Test where one value is equal to another. |
|
EXECUTE_FUNCTION
Execute a function. |
|
EXECUTE_METHOD
Execute a method. |
|
EXTENDS
Identifies that a class inherits from a class. |
|
FS_COMMAND2
FSCommand2 function |
|
GET_ATTRIBUTE
Get the value of an object's attribute. |
|
GET_PROPERTY
Push the value of the specified property on the stack. |
|
GET_TARGET
Return the path to the current movie clip. |
|
GET_TIME
Return the elapsed time since the start of the movie. |
|
GET_TYPE
Return the type of an object or value. |
|
GET_VARIABLE
Get the value of a variable. |
|
GREATER
Test whether a number is greater than another. |
|
IMPLEMENTS
Identifies a class implements a defined interface. |
|
INCREMENT
Increment a number. |
|
INIT_VARIABLE
Create and set a variable. |
|
INSTANCEOF
Tests whether an object can be created using the constructor. |
|
INTEGER_ADD
Add two integers. |
|
INTEGER_EQUALS
Test whether two integers are equal. |
|
INTEGER_LESS
Test where one number is less than another. |
|
LESS
Test where one value is less than another. |
|
LOGICAL_AND
Logically and two values together. |
|
LOGICAL_NOT
Logically invert a value. |
|
LOGICAL_OR
Logically or two values together. |
|
MB_ASCII_TO_CHAR
Convert a Unicode value to the equivalent character. |
|
MB_CHAR_TO_ASCII
Convert the first character of string to its Unicode value. |
|
MB_STRING_EXTRACT
Substring of a multi-byte string. |
|
MB_STRING_LENGTH
Get the length of an multi-byte string. |
|
MODULO
Calculate the modulus of two numbers. |
|
MULTIPLY
Multiply two numbers. |
|
NAMED_OBJECT
Construct an instance of a built-in object. |
|
NEW_ARRAY
Create a new array. |
|
NEW_METHOD
Define a new method for an object. |
|
NEW_OBJECT
Define a new class. |
|
NEW_VARIABLE
Create a new variable. |
|
NEXT_FRAME
Move to the next frame. |
|
PLAY
Start playing the movie or movie clip. |
|
POP
Pop value from the top of the stack. |
|
PREV_FRAME
Move to the previous frame. |
|
RANDOM_NUMBER
Push a random number onto the stack. |
|
REMOVE_SPRITE
Delete a movie clip. |
|
RETURN
Return control from a function. |
|
SET_ATTRIBUTE
Set the value of an object's attribute. |
|
SET_PROPERTY
Set the value of a property. |
|
SET_TARGET_2
Execute the following actions with the named movie clip. |
|
SET_VARIABLE
Set the value of a variable. |
|
SHIFT_LEFT
Shift a number left. |
|
SHIFT_RIGHT
Shift a number right. |
|
START_DRAG
Start dragging the mouse. |
|
STOP
Stop playing the movie or movie clip. |
|
STOP_SOUNDS
Stop playing all sounds. |
|
STRICT_EQUALS
Test whether type and value of two objects are equal. |
|
STRING_ADD
Concatenate two strings. |
|
STRING_EQUALS
Test whether two strings are equal. |
|
STRING_EXTRACT
Substring. |
|
STRING_GREATER
Test whether a string is greater than another. |
|
STRING_LENGTH
Get the length of an ASCII string. |
|
STRING_LESS
Test where one string is less than another. |
|
SUBTRACT
Subtract two integers. |
|
SWAP
Swap the top two values on the stack. |
|
THROW
Throw an exception. |
|
TO_INTEGER
Convert a value to an integer. |
|
TO_NUMBER
Converts the string value to a number. |
|
TO_STRING
Converts the value to a string. |
|
TOGGLE_QUALITY
Toggle the movie between high and low quality. |
|
TRACE
Append value to debugging window. |
|
| Method Summary | |
|---|---|
BasicAction |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
static BasicAction |
fromInt(int actionType)
Returns the BasicAction for a given type. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
static BasicAction |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static BasicAction[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final BasicAction END
public static final BasicAction NEXT_FRAME
public static final BasicAction PREV_FRAME
public static final BasicAction PLAY
public static final BasicAction STOP
public static final BasicAction TOGGLE_QUALITY
public static final BasicAction STOP_SOUNDS
public static final BasicAction INTEGER_ADD
public static final BasicAction SUBTRACT
public static final BasicAction MULTIPLY
public static final BasicAction DIVIDE
public static final BasicAction INTEGER_EQUALS
public static final BasicAction INTEGER_LESS
public static final BasicAction LOGICAL_AND
public static final BasicAction LOGICAL_NOT
public static final BasicAction LOGICAL_OR
public static final BasicAction STRING_EQUALS
public static final BasicAction STRING_LENGTH
public static final BasicAction STRING_EXTRACT
public static final BasicAction POP
public static final BasicAction TO_INTEGER
public static final BasicAction GET_VARIABLE
public static final BasicAction SET_VARIABLE
public static final BasicAction SET_TARGET_2
public static final BasicAction STRING_ADD
public static final BasicAction GET_PROPERTY
public static final BasicAction SET_PROPERTY
public static final BasicAction CLONE_SPRITE
public static final BasicAction REMOVE_SPRITE
public static final BasicAction TRACE
public static final BasicAction START_DRAG
public static final BasicAction END_DRAG
public static final BasicAction STRING_LESS
public static final BasicAction THROW
public static final BasicAction CAST
public static final BasicAction IMPLEMENTS
public static final BasicAction FS_COMMAND2
public static final BasicAction RANDOM_NUMBER
public static final BasicAction MB_STRING_LENGTH
public static final BasicAction CHAR_TO_ASCII
public static final BasicAction ASCII_TO_CHAR
public static final BasicAction GET_TIME
public static final BasicAction MB_STRING_EXTRACT
public static final BasicAction MB_CHAR_TO_ASCII
public static final BasicAction MB_ASCII_TO_CHAR
public static final BasicAction DELETE_VARIABLE
public static final BasicAction DELETE
public static final BasicAction INIT_VARIABLE
public static final BasicAction EXECUTE_FUNCTION
public static final BasicAction RETURN
public static final BasicAction MODULO
public static final BasicAction NAMED_OBJECT
public static final BasicAction NEW_VARIABLE
public static final BasicAction NEW_ARRAY
public static final BasicAction NEW_OBJECT
public static final BasicAction GET_TYPE
public static final BasicAction GET_TARGET
public static final BasicAction ENUMERATE
public static final BasicAction ADD
public static final BasicAction LESS
public static final BasicAction EQUALS
public static final BasicAction TO_NUMBER
public static final BasicAction TO_STRING
public static final BasicAction DUPLICATE
public static final BasicAction SWAP
public static final BasicAction GET_ATTRIBUTE
public static final BasicAction SET_ATTRIBUTE
public static final BasicAction INCREMENT
public static final BasicAction DECREMENT
public static final BasicAction EXECUTE_METHOD
public static final BasicAction NEW_METHOD
public static final BasicAction INSTANCEOF
public static final BasicAction ENUMERATE_OBJECT
public static final BasicAction BITWISE_AND
public static final BasicAction BITWISE_OR
public static final BasicAction BITWISE_XOR
public static final BasicAction SHIFT_LEFT
public static final BasicAction ARITH_SHIFT_RIGHT
public static final BasicAction SHIFT_RIGHT
public static final BasicAction STRICT_EQUALS
public static final BasicAction GREATER
public static final BasicAction STRING_GREATER
public static final BasicAction EXTENDS
| Method Detail |
|---|
public static BasicAction[] values()
for (BasicAction c : BasicAction.values()) System.out.println(c);
public static BasicAction valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static BasicAction fromInt(int actionType)
actionType - the type that identifies the action when it is encoded.
public BasicAction copy()
copy in interface Copyable<Action>public int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder,
Context context)
throws IOException
encode in interface SWFEncodeablecoder - an SWFEncoder object.context - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException - if an error occurs while encoding the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||