/// <summary> /// Divides two numbers and pushes the result back to the stack. /// </summary> public ActionDivide() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_float ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_float ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_float ); }
/// <summary> /// Performs a bitwise OR operation. /// </summary> public ActionBitOr() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_integer ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_integer ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_integer ); }
/// <summary> /// retrieves a named property from an object, and /// pushes the value of the property onto the stack /// </summary> public ActionGetMember() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); // name _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_Object ); // object _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_ANY ); }
/// <summary> /// Is similar to ActionAdd, but performs the addition differently, /// according to the data types of the arguments. The addition /// operator algorithm in ECMA-262 Section 11.6.1 is used. /// If string concatenation is applied, the concatenated string /// is arg2 followed by arg1 /// </summary> public ActionAdd2() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_ANY ); }
/// <summary> /// Implements the ActionScript cast operator, which allows the casting from /// one data type to another. ActionCastOp pops an object off the stack and /// attempts to convert the object to an instance of the class or to the /// interface represented by the constructor function. /// </summary> public ActionCastOp() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_Object ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_Function ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_Object ); }
/// <summary> /// Performs a logical NOT of a number /// </summary> public ActionNot() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); // default to version >=5 _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Converts a value to an integer /// </summary> public ActionToInteger() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); // default version >= 5 _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_integer ); }
/// <summary> /// Compares if arg2 > arg1 /// </summary> public ActionGreater() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Gets a file property /// </summary> public ActionGetProperty() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); // index (as string) _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_String ); // target _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_ANY ); }
/// <summary> /// Tests two strings for equality /// </summary> public ActionStringEquals() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_String ); }
/// <summary> /// Performs a bitwise left shift /// </summary> public ActionBitLShift() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_integer ); // arg _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_integer ); // shift value _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_integer ); }
/// <summary> /// is similar to ActionEquals2, but the two arguments must be of the same /// type in order to be considered equal. Implements the ‘===’ operator /// from the ActionScript language. /// </summary> public ActionStrictEquals() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Extracts a substring from a string /// </summary> public ActionStringExtract() { _StackOps = new StackChange[ 4 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); // count _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_String ); // index _StackOps[ 2 ] = new StackPop( AVM1DataTypes.AVM_String ); // the string _StackOps[ 3 ] = new StackPush( AVM1DataTypes.AVM_String ); // the substring (result) }
/// <summary> /// Tests to see if a string is less than another string /// </summary> public ActionStringLess() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_String ); // default version >= 5 _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Tests two numbers for equality /// </summary> public ActionEquals() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_String ); // defaults to version 5 or higher _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Swaps the top two ScriptAtoms on the stack /// </summary> public ActionStackSwap() { _StackOps = new StackChange[ 4 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); // a _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_ANY ); // b _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_ANY ); // a _StackOps[ 3 ] = new StackPush( AVM1DataTypes.AVM_ANY ); // b }
/// <summary> /// Performs a logical AND /// </summary> public ActionAnd() { _StackOps = new StackChange[ 3 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPop( AVM1DataTypes.AVM_String ); // default to Version 5 and higher _StackOps[ 2 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Converts the object on the top of the stack into a String, /// and pushes the string back to the stack /// </summary> public ActionToString() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_String ); }
/// <summary> /// Implements the ActionScript instanceof() operator /// </summary> public ActionInstanceOf() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_Object ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_boolean ); }
/// <summary> /// Pops a value from the stack, converts it to number type, decrements it by 1, and pushes it back to the stack /// </summary> public ActionDecrement() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_integer ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_integer ); }
/// <summary> /// If the object in the stack is of type MovieClip, the object’s /// target path is pushed on the stack in dot notation. If the object /// is not a MovieClip, the result is undefined rather than the movie /// clip target path. /// </summary> public ActionTargetPath() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_Object ); // must be movie-clip _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_String ); // target path }
/// <summary> /// Converts the object on the top of the stack /// into a number, and pushes the number back to the stack /// </summary> public ActionToNumber() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_integer ); }
/// <summary> /// pushes the object type to the stack, which is equivalent /// to the ActionScript TypeOf() method. The possible types are: /// "number","boolean","string","object","movieclip","null", /// "undefined","function" /// </summary> public ActionTypeOf() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_ANY ); // the thing to inspect _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_String ); // type name }
/// <summary> /// Computes the length of a string /// </summary> public ActionStringLength() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_String ); // bool }
/// <summary> /// Pushes a duplicate of top of stack (the current return value) to the stack. /// </summary> public ActionPushDuplicate() { _StackOps = new StackChange[ 1 ]; _StackOps[ 0 ] = new StackPush( AVM1DataTypes.AVM_ANY ); }
/// <summary> /// Converts character code to ASCII and is multi-byte aware /// </summary> public ActionMBCharToAscii() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_String ); }
/// <summary> /// Reports the milliseconds since Adobe Flash Player started. /// </summary> public ActionGetTime() { _StackOps = new StackChange[ 1 ]; _StackOps[ 0 ] = new StackPush( AVM1DataTypes.AVM_String ); }
/// <summary> /// Calculates a pseudo random number /// </summary> public ActionRandomNumber() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_integer ); // maximum _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_integer ); // rnd }
/// <summary> /// Converts character code to ASCII. /// </summary> public ActionCharToAscii() { _StackOps = new StackChange[ 2 ]; _StackOps[ 0 ] = new StackPop( AVM1DataTypes.AVM_String ); _StackOps[ 1 ] = new StackPush( AVM1DataTypes.AVM_String ); // ASCII value of the first character }