| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
ApplyTweensTimer |
|
|
See also
| Property | Defined By |
|---|---|
|
xAlpha
: Number
The starting alpha value for fade in or out. |
ApplyTweensTimer |
|
xPosition
: int
The x position to move the instance to. |
ApplyTweensTimer |
|
yPosition
: int
The y position to move the instance to. |
ApplyTweensTimer |
|
easeOut
: Boolean
To include easing out. |
ApplyTweensTimer |
|
easeIn
: Boolean
To include easing in. |
ApplyTweensTimer |
| Method | Defined By |
|---|---|
|
ApplyTweensTimer(target:Object, myDuration:int, type:String, delay:int, repeatCount:int)
Creates a new instance of the ApplyTweensTimer class. |
ApplyTweensTimer |
|
initTweens()
Will initiate the tween when an instance of the ApplyTweensTimer class exists. |
ApplyTweensTimer |
| Event | Defined By |
|---|---|
|
callBack This event is dispatched when the tween action is finished. |
ApplyTweensTimer |
| All inherited events for the Sprite class. | N/A |
| Property Detail |
|---|
|
xAlpha
property
xAlpha:Number [read-write] This sets the initial value for the alpha fading. For fading in the default value is 0, for fading out myTarget.alpha. .Implementationpublic function get xAlpha():Numberpublic function set xAlpha(value:Number):void |
|
xPosition property xPosition:int [read-write] This is the x position for the object to move to. The default value is 0. Implementationpublic function get xPosition():intpublic function set xPosition(value:int):void |
|
yPosition property yPosition:int [read-write] This is the y position for the object to move to. The default value is 0. Implementationpublic function get yPosition():intpublic function set yPosition(value:int):void |
|
easeOut property easeOut:Boolean [read-write] To add easing out behaviour set easeOut to true. The default value is false. Implementationpublic function get easeOut():Booleanpublic function set easeOut(value:Boolean):void |
|
easeIn property easeIn:Boolean [read-write] To add easing in behaviour set easeIn to true. The default value is false. Implementationpublic function get easeIn():Booleanpublic function set easeIn(value:Boolean):void |
| Constructor Detail |
|---|
|
ApplyTweensTimer () Constructor
public function ApplyTweens(target:Object, myDuration:int, type:String, delay:int, repeatCount:int) |
| Intializes a new ApplyTweensTimer instance. |
Parameters
|
| Method Detail |
|---|
|
initTweens ():void method
This method will initiate the tweening methods. To change certain properties add the property before the method call: ax.easeIn=true;ax.initTweens(); |
| Event Detail |
|---|
|
callBack event
Event Object Type:
biz.flashscript.tweens.ApplyTweensTimer
Dispatched when the tween is finished. |
| Examples |
|---|
The following example demonstrates how to use the
ApplyTweens
and
ApplyTweensTimer
class simultanously. Create a new fla file and name it ApplyTweenTimer.fla. Place the fla in the same folder as the biz folder. Create a MovieClip
Clip
and export for actionscript. Then create an Actionscript file, name it ApplyTweenTimer.as and place this script.
package
{
import flash.display.Sprite;
import flash.events.Event;
import biz.flashscript.tweens.ApplyTweens;
import biz.flashscript.tweens.ApplyTweensTimer;
public class ApplyTweenTimer extends Sprite
{
public function ApplyTweenTimer ():void
{
var mc:Clip = new Clip();
addChild (mc);
var ax:ApplyTweens = new ApplyTweens(mc,20,"xyMove");
var at:ApplyTweensTimer = new ApplyTweensTimer(mc,75,"alphaOut",10,1000);
at.finalAlpha = 0.2;
ax.xPosition = 400;
ax.yPosition = 200;
ax.easeIn = true;
ax.initTweens ();
at.initTweens ();
ax.addEventListener (ApplyTweens.CALL_BACK, callHandler);
}
private function callHandler (event:Event):void
{
trace ("Event: "+event);
}
}
}
|