ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.motion 

Source  - AS3 Flash

Packagefl.motion
Classpublic class Source
InheritanceSource Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The Source class stores information about the context in which a Motion instance was generated. Many of its properties do not affect animation created using ActionScript with the Animator class but are present to store data from the Motion XML. The transformationPoint property is the most important for an ActionScript Motion instance.

Related API Elements



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  dimensions : Rectangle
Indicates the position and size of the bounding box of the object from which the Motion instance was generated.
Source
  elementType : String
Indicates the type of object from which the Motion instance was generated.
Source
  frameRate : Number = NaN
Indicates the frames per second of the movie in which the Motion instance was generated.
Source
  instanceName : String
Indicates the instance name given to the movie clip from which the Motion instance was generated.
Source
  linkageID : String
Indicates the library linkage identifier for the symbol from which the Motion instance was generated.
Source
  rotation : Number = 0
Indicates the rotation value of the original object.
Source
  scaleX : Number = 1
Indicates the scaleX value of the original object.
Source
  scaleY : Number = 1
Indicates the scaleY value of the original object.
Source
  skewX : Number = 0
Indicates the skewX value of the original object.
Source
  skewY : Number = 0
Indicates the skewY value of the original object.
Source
  symbolName : String
Indicates the name of the symbol from which the Motion instance was generated.
Source
  transformationPoint : Point
Specifies the location of the transformation or "pivot" point of the original object, from which transformations are applied.
Source
  x : Number = 0
Indicates the x value of the original object.
Source
  y : Number = 0
Indicates the y value of the original object.
Source
Public Methods
 MethodDefined By
  
Source(xml:XML = null)
Constructor for Source instances.
Source
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

dimensions

property
public var dimensions:Rectangle

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the position and size of the bounding box of the object from which the Motion instance was generated. This property stores data from Motion XML but does not affect Motion instances created using ActionScript.

elementType

property 
public var elementType:String

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the type of object from which the Motion instance was generated. Possible values are "rectangle object", "oval object", "drawing object", "group", "bitmap", "compiled clip", "video", "text"

frameRate

property 
public var frameRate:Number = NaN

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the frames per second of the movie in which the Motion instance was generated. This property stores data from Motion XML but does not affect Motion instances created using ActionScript.

instanceName

property 
public var instanceName:String

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the instance name given to the movie clip from which the Motion instance was generated. This property stores data from Motion XML but does not affect Motion instances created using ActionScript.

linkageID

property 
public var linkageID:String

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the library linkage identifier for the symbol from which the Motion instance was generated. This property stores data from Motion XML but does not affect Motion instances created using ActionScript.

rotation

property 
public var rotation:Number = 0

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the rotation value of the original object.

Related API Elements

scaleX

property 
public var scaleX:Number = 1

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the scaleX value of the original object.

Related API Elements

scaleY

property 
public var scaleY:Number = 1

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the scaleY value of the original object.

Related API Elements

skewX

property 
public var skewX:Number = 0

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the skewX value of the original object.

Related API Elements

skewY

property 
public var skewY:Number = 0

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the skewY value of the original object.

Related API Elements

symbolName

property 
public var symbolName:String

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the name of the symbol from which the Motion instance was generated. This property stores data from Motion XML but does not affect Motion instances created using ActionScript.

transformationPoint

property 
public var transformationPoint:Point

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Specifies the location of the transformation or "pivot" point of the original object, from which transformations are applied. The coordinates of the transformation point are defined as a percentage of the visual object's dimensions (its bounding box). If the transformation point is at the upper-left corner of the bounding box, the coordinates are (0, 0). The lower-right corner of the bounding box is (1, 1). This property allows the transformation point to be applied consistently to objects of different proportions and registration points. The transformation point can lie outside of the bounding box, in which case the coordinates may be less than 0 or greater than 1. This property has a strong effect on Motion instances created using ActionScript.

x

property 
public var x:Number = 0

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the x value of the original object.

Related API Elements

y

property 
public var y:Number = 0

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Indicates the y value of the original object.

Related API Elements

Constructor Detail

Source

()Constructor
public function Source(xml:XML = null)

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Constructor for Source instances.

Parameters
xml:XML (default = null) — Optional E4X XML object defining a Source instance in Motion XML format.