background preloader

Flash&AS3

Facebook Twitter

Object (ActionScript 3.0) Public var constructor:Object A reference to the class object or constructor function for a given object instance. If an object is an instance of a class, the constructor property holds a reference to the class object. If an object is created with a constructor function, the constructor property holds a reference to the constructor function. Do not confuse a constructor function with a constructor method of a class. A constructor function is a Function object used to create objects, and is an alternative to using the class keyword for defining classes.

If you use the class keyword to define a class, the class's prototype object is assigned a property named constructor that holds a reference to the class object. An instance of the class inherits this property from the prototype object. Dynamic class A {} trace(A.prototype.constructor); // [class A] trace(A.prototype.constructor == A); // true var myA:A = new A(); trace(myA.constructor == A); // true Related API Elements. Operators (ActionScript 3.0) Symbolic operators are characters that specify how to combine, compare, or modify the values of an expression.

Usage Adds numeric expressions. If both expressions are integers, the sum is an integer; if either or both expressions are floating-point numbers, the sum is a floating-point number. If one expression is a string, all other expressions are converted to strings and concatenated instead of summed. Otherwise, if an expression is not a number, Flash® Player converts it to a number.

OperandsResultExample How to use this example This statement adds the integers 2 and 3: This statement adds the floating-point numbers 2.5 and 3.25: trace(2.5 + 3.25); // 5.75 This example shows that if one expression is a string, all other expressions are converted to strings and concatenated: trace("Number " + 8 + 0); // Number 80 Variables associated with dynamic and input text fields have the data type String. Related API Elements Assigns expression1 the value of expression1 + expression2. X += y; x = x + y; Number (ActionScript 3.0) A data type representing an IEEE-754 double-precision floating-point number. You can manipulate primitive numeric values by using the methods and properties associated with the Number class. This class is identical to the JavaScript Number class. The properties of the Number class are static, which means you do not need an object to use them, so you do not need to use the constructor. The Number data type adheres to the double-precision IEEE-754 standard.

The Number data type is useful when you need to use floating-point values. View the examples. Actionscript 3 ValueObject-Generator - Mark Knol. Flash_as3_programming.pdf (application/pdf Object) Flash.display.DisplayObject (ActionScript 3.0) CacheAsBitmapMatrix:Matrix If non-null, this Matrix object defines how a display object is rendered when cacheAsBitmap is set to true. The application uses this matrix as a transformation matrix that is applied when rendering the bitmap version of the display object.

AIR profile support: This feature is supported on mobile devices, but it is not supported on desktop operating systems. It also has limited support on AIR for TV devices. Specifically, on AIR for TV devices, supported transformations include scaling and translation, but not rotation and skewing. See AIR Profile Support for more information regarding API support across multiple profiles. With cacheAsBitmapMatrix set, the application retains a cached bitmap image across various 2D transformations, including translation, rotation, and scaling. To use the hardware acceleration, set Rendering to GPU in the General tab of the iPhone Settings dialog box in Flash Professional CS5.

Learn more Related API Elements. Flex in a Week video training.