fl.motion

# AnimatorFactoryBase - AS3 Flash

Package | fl.motion
Class | public class AnimatorFactoryBase
Inheritance | AnimatorFactoryBase Object
Subclasses | AnimatorFactory, AnimatorFactory3D, AnimatorFactoryUniversal

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The AnimatorFactoryBase class provides ActionScript-based support to display and tween multiple targeted objects with one Motion dynamically at runtime. AnimatorFactoryBase uses the AnimatorBase class to assign one Motion (derived from MotionBase) to multiple tween instances (targeted objects) whereas the AnimatorBase class associates a single Motion instance with a single targeted tween object. The AnimatorFactoryBase class should not be used on its own. Use its subclasses: AnimatorFactory or AnimatorFactory3D, instead.

Related API Elements

fl.motion.Animator
fl.motion.AnimatorFactory

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | motion : MotionBase [read-only] The MotionBase instance that the AnimatorFactoryBase instance and its target objects are associated with. | AnimatorFactoryBase
|  | sceneName : String [write-only] A reference for exported scenes, for 3D motion, so the scene can be loaded into a parent timeline. | AnimatorFactoryBase
|  | transformationPoint : Point [write-only] The point of reference for rotating or scaling a display object. | AnimatorFactoryBase
|  | transformationPointZ : int [write-only] The z-coordinate point of reference for rotating or scaling a display object. | AnimatorFactoryBase

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AnimatorFactoryBase(motion:MotionBase, motionArray:Array = null) Creates an instance of the AnimatorFactoryBase class. | AnimatorFactoryBase
|  | addTarget(target:DisplayObject, repeatCount:int = 0, autoPlay:Boolean = true, startFrame:int = -1, useCurrentFrame:Boolean = false):AnimatorBase Creates and returns an AnimatorBase instance whose target property is set to the DisplayObject (if applicable) that is the targetName property of the targetParent, and whose Motion property is stored in the AnimatorFactoryBase instance upon creation. | AnimatorFactoryBase
|  | addTargetInfo(targetParent:DisplayObject, targetName:String, repeatCount:int = 0, autoPlay:Boolean = true, startFrame:int = -1, useCurrentFrame:Boolean = false, initialPosition:Array = null, zIndex:int = -1, placeholderName:String = null, instanceFactoryClass:Class = null):AnimatorBase
References the parent DisplayObjectContainer and then creates and returns an AnimatorBase instance whose target property is set to the DisplayObject (if applicable) that is the targetName property of the targetParent, and whose Motion property is stored in the AnimatorFactoryBase instance upon creation.
AnimatorFactoryBase
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### motion

property

`motion:MotionBase` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The `MotionBase` instance that the `AnimatorFactoryBase` instance and its target objects are associated with. The `MotionBase` instance stores the animated properties and their values.

Implementation
`public function get motion():MotionBase`

Related API Elements

fl.motion.Motion

### sceneName

property

`sceneName:String` [write-only]

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

A reference for exported scenes, for 3D motion, so the scene can be loaded into a parent timeline.

Implementation
`public function set sceneName(value:String):void`

### transformationPoint

property

`transformationPoint:Point` [write-only]

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The point of reference for rotating or scaling a display object. The `transformationPoint` property (or setter) is overridden in the `AnimatorFactory3D` subclass, In 3D, the points are not percentages like they are in 2D; they are absolute values of the original object's transformation point.

Implementation
`public function set transformationPoint(value:Point):void`

### transformationPointZ

property

`transformationPointZ:int` [write-only]

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The z-coordinate point of reference for rotating or scaling a display object. The `transformationPointZ` property (or setter) is overridden in the `AnimatorFactory3D` subclass, In 3D, the points are not percentages like they are in 2D; they are absolute values of the original object's transformation point.

Implementation
`public function set transformationPointZ(value:int):void`
Constructor Detail

### AnimatorFactoryBase

()
Constructor

`public function AnimatorFactoryBase(motion:MotionBase, motionArray:Array = null)`

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Creates an instance of the `AnimatorFactoryBase` class.

Parameters

| `motion:MotionBase` — The associated MotionBase instance.
| `motionArray:Array` (default = `null`)``

Method Detail

### addTarget

()
method

`public function addTarget(target:DisplayObject, repeatCount:int = 0, autoPlay:Boolean = true, startFrame:int = -1, useCurrentFrame:Boolean = false):AnimatorBase`

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Creates and returns an `AnimatorBase` instance whose target property is set to the `DisplayObject` (if applicable) that is the `targetName` property of the `targetParent`, and whose `Motion` property is stored in the `AnimatorFactoryBase` instance upon creation.

Parameters

| `target:DisplayObject` — The display object using the motion tween.
| `repeatCount:int` (default = `0`)`` — The number of times the animation should play. The default value is 0, which means the animation will loop indefinitely.
| `autoPlay:Boolean` (default = `true`)`` — The value (default is true) specifying whether the animation automatically begins to play.
| `startFrame:int` (default = `-1`)`` — The frame on which the animation starts relative to the parent's timeline. If the parent's timeline is shorter than the duration of the associated Motion, then startFrame indicates the number of frames after this `addTarget` call is made before the target animation begins.
| `useCurrentFrame:Boolean` (default = `false`)`` — A flag specifying, if true, to use the parent's `currentFrame` property to determine which animation frame the target object should be on.

Returns

| `AnimatorBase` — A new AnimatorBase instance.

Related API Elements

addTargetInfo()
fl.motion.Animator
fl.motion.Motion
flash.display.DisplayObject

### addTargetInfo

()
method

`public function addTargetInfo(targetParent:DisplayObject, targetName:String, repeatCount:int = 0, autoPlay:Boolean = true, startFrame:int = -1, useCurrentFrame:Boolean = false, initialPosition:Array = null, zIndex:int = -1, placeholderName:String = null, instanceFactoryClass:Class = null):AnimatorBase`

Language Version: | ActionScript 3.0

Product Version: | Flash CS4

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

References the parent `DisplayObjectContainer` and then creates and returns an `AnimatorBase` instance whose target property is set to the `DisplayObject` (if applicable) that is the `targetName` property of the `targetParent`, and whose `Motion` property is stored in the `AnimatorFactoryBase` instance upon creation.

Parameters

| `targetParent:DisplayObject` — The parent DisplayObjectContainer.
| `targetName:String` — The target's instance name as seen by its parent.
| `repeatCount:int` (default = `0`)`` — The number of times the animation should play. The default value is 0, which means the animation will loop indefinitely.
| `autoPlay:Boolean` (default = `true`)`` — The value (default is true) specifying whether the animation automatically begins to play.
| `startFrame:int` (default = `-1`)`` — The frame on which the animation starts relative to the parent's timeline. If the parent's timeline is shorter than the duration of the associated Motion, then startFrame indicates the number of frames after this `addTarget` call is made before the target animation begins. If the parent is a SimpleButton, then startFrame is used to indicate the button state in which the motion should be applied: 0 for upState, 1 for overState, 2 for downState.
| `useCurrentFrame:Boolean` (default = `false`)`` — A flag specifying, if true, to use the parent's `currentFrame` property to determine which animation frame the target object should be on.
| `initialPosition:Array` (default = `null`)`` — if not null, used to set initialPosition property on generated AnimatorBase instance.
| `zIndex:int` (default = `-1`)`` — If the parent is a SimpleButton, then this value is the 0-based z order of the object to which to apply the animation. If there is only a single object in the button, then zIndex should be set to -1, not 0. defaults to -1.
| `placeholderName:String` (default = `null`)`` — if not null, used to specify instance on stage to be replaced by DisplayObject created by instanceNameFactoryClass. Defaults to null.
| `instanceFactoryClass:Class` (default = `null`)`` — if not null, class used to create a DisplayObject that will replace a placeholder. Defaults to null.

Returns

| `AnimatorBase` — A new AnimatorBase instance.

Related API Elements

addTarget()
fl.motion.Animator
fl.motion.Motion
flash.display.DisplayObjectContainer

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00