Package | mx.effects |
Class | public class Parallel |
Inheritance | Parallel CompositeEffect Effect flash.events.EventDispatcher |
You can create a Paralell effect in MXML, as the following example shows:
<mx:Parallel id="WipeRightUp"> <mx:children> <mx:WipeRight duration="1000"/> <mx:WipeUp duration="1000"/> </mx:children> </mx:Parallel> <mx:VBox id="myBox" hideEffect="{WipeRightUp}" > <mx:TextArea id="aTextArea" text="hello"/> </mx:VBox>
Notice that the <mx:children>
tag is optional.
Starting a Parallel effect in ActionScript is usually a five-step process:
myFadeEffect = new mx.effects.Fade(target);
duration
, on the individual effect objects.myParallelEffect = new mx.effects.Parallel();
addChild()
method for each of the effect objects;
for example:
myParallelEffect.addChild(myFadeEffect);
play()
method;
for example:
myParallelEffect.play();
The <mx:Parallel> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:
<mx:Parallel id="identifier"> <mx:children> <!-- Specify child effect tags --> </mx:children> </mx:Parallel>
See also
Method | Defined by | ||
---|---|---|---|
Parallel(target:Object = null)
Constructor.
| Parallel | ||
Adds a new child effect to this composite effect.
| CompositeEffect | ||
captureEndValues():void
Captures the current values of the relevant properties
on the effect's targets and saves them as end values.
| Effect | ||
captureMoreStartValues(targets:Array):void
Captures the current values of the relevant properties
of an additional set of targets
This function is used by Flex when a data change effect is run. | Effect | ||
captureStartValues():void
Captures the current values of the relevant properties
on the effect's targets.
| Effect | ||
createInstance(target:Object = null):IEffectInstance
Creates a single effect instance and initializes it.
| Effect | ||
createInstances(targets:Array = null):Array
Takes an Array of target objects and invokes the
createInstance() method on each target. | Effect | ||
deleteInstance(instance:IEffectInstance):void
Removes event listeners from an instance
and removes it from the list of instances.
| Effect | ||
end(effectInstance:IEffectInstance = null):void
Interrupts an effect that is currently playing,
and jumps immediately to the end of the effect.
| Effect | ||
getAffectedProperties():Array
Returns an Array of Strings, where each String is the name
of a property that is changed by this effect.
| Effect | ||
pause():void
Pauses the effect until you call the
resume() method. | Effect | ||
play(targets:Array = null, playReversedFromEnd:Boolean = false):Array
Begins playing the effect.
| Effect | ||
resume():void
Resumes the effect after it has been paused
by a call to the
pause() method. | Effect | ||
reverse():void
Plays the effect in reverse, if the effect is currently playing,
starting from the current position of the effect.
| Effect | ||
stop():void
Stops the effect, leaving the effect targets in their current state.
| Effect |
Parallel | () | constructor |
public function Parallel(target:Object = null)
Constructor.
Parameterstarget:Object (default = null ) — This argument is ignored for Parallel effects.
It is included only for consistency with other types of effects.
|