Inheritance: StackChange
示例#1
0
 /// <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 );
 }
示例#2
0
 /// <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 );
 }
示例#3
0
 /// <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 );
 }
示例#4
0
 /// <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 );
 }
示例#5
0
 /// <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 );
 }
示例#6
0
 /// <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 );
 }
示例#7
0
 /// <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 );
 }
示例#8
0
 /// <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 );
 }
示例#9
0
 /// <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 );
 }
示例#10
0
 /// <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 );
 }
示例#11
0
 /// <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 );
 }
示例#12
0
 /// <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 );
 }
示例#13
0
 /// <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)
 }
示例#14
0
 /// <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 );
 }
示例#15
0
 /// <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 );
 }
示例#16
0
 /// <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
 }
示例#17
0
 /// <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 );
 }
示例#18
0
 /// <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 );
 }
示例#19
0
 /// <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 );
 }
示例#20
0
 /// <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 );
 }
示例#21
0
 /// <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
 }
示例#22
0
 /// <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 );
 }
示例#23
0
 /// <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
 }
示例#24
0
 /// <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
 }
示例#25
0
 /// <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 );
 }
示例#26
0
 /// <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 );
 }
示例#27
0
 /// <summary>
 /// Reports the milliseconds since Adobe Flash Player started.
 /// </summary>
 public ActionGetTime()
 {
     _StackOps = new StackChange[ 1 ];
     _StackOps[ 0 ] = new StackPush( AVM1DataTypes.AVM_String );
 }
示例#28
0
 /// <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
 }
示例#29
0
 /// <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
 }