My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.vfd.animation{
/**
* Animation class. Based off of mc_tween2.as project.
* @author Jeremy Wischusen <cortex@visualflowdesigns.com>
* This is now basically a convienience class that wraps the functionality
* of ClipAnimator into a class that can be attached via a library linkage.
*/
import flash.display.Sprite;
import com.vfd.animation.ClipAnimator;
public class AnimatedClip extends Sprite {
private var _animator:ClipAnimator;
public function AnimatedClip() {
this._animator = new ClipAnimator(this);
}
public function resetPosition():void {
this._animator.resetPosition();
}
public function moveToPoint(x:Number, y:Number,duration:Number = 0, loop:Boolean = false):void {
this._animator.moveToPoint(x,y,duration,loop);
}
public function fadeTo(val:Number =0, duration:Number = 0, loop:Boolean = false):void {
this._animator.fadeTo(val,duration,loop);
}
public function sizeTo(w:Number, h:Number, duration:Number=0, loop:Boolean = false):void {
this._animator.sizeTo(w,h,duration, loop);
}
public function widthTo(w:Number, duration:Number, loop:Boolean = false):void {
this._animator.widthTo(w, duration, loop);
}
public function heightTo(h:Number, duration:Number, loop:Boolean = false):void {
this._animator.heightTo(h,duration,loop);
}
public function spinTo(rot:Number= 0, duration:Number = 0, loop:Boolean = false):void {
this._animator.spinTo(rot,duration, loop);
}
public function xTo(x:Number, duration:Number = 0, loop:Boolean = false):void {
this._animator.xTo(x, duration, loop);
}
public function yTo(y:Number, duration:Number = 0, loop:Boolean = false):void {
this._animator.yTo(y,duration, loop);
}
public function set easing(ease:Function):void {
this._animator.easing = ease;
}
public function colorTo(color:Number, duration:Number):void {
this._animator.colorTo(color, duration);
}
public function set currentColor(clr:Number) {
this._animator.currentColor = clr;

}
public function startOrbit():void {
this._animator.startOrbit();
}
public function stopOrbit():void {
this._animator.stopOrbit();
}
public function get animator():ClipAnimator {
return this._animator;
}
}
}

Change log

r19 by jeremy.wischusen on Aug 22, 2008   Diff
Moved animation logic to ClipAnimator
class which can be directly instantiated
and passed a reference to a clip.
AnimatedClip is now a wrapper class that
deligates functionaity to ClipAnimator.
This allows for animation both using the
library linkage via AnimatedClip (since
library linked classes for display objects
must extend a display class such as
movieclip or sprite) and direcly on the
time line using ClipAnimator.
Additionally, standard tweens in the
...
Go to: 
Project members, sign in to write a code review

Older revisions

r15 by jeremy.wischusen on Aug 14, 2008   Diff
Added getter methods for tween objects
so that they can be referenced for
adding event listeners.
r12 by jeremy.wischusen on May 14, 2008   Diff
Started As 2 version of AnimatedClip.
Fixed looping in AS 3 version of
AnimatedClip for moveToPoint method.
r11 by jeremy.wischusen on May 14, 2008   Diff
Added package statement back in.
All revisions of this file

File info

Size: 2320 bytes, 62 lines
Powered by Google Project Hosting