/src/com/greensock/core/PropTween.as
ActionScript | 62 lines | 26 code | 1 blank | 35 comment | 1 complexity | ba7b42aa4eeddf9bd6fdd925935f70ad MD5 | raw file
1/**
2 * VERSION: 2.1
3 * DATE: 2009-09-12
4 * AS3
5 * UPDATES AND DOCS AT: http://www.greensock.com
6 **/
7package com.greensock.core {
8/**
9 * @private
10 * Stores information about an individual property tween. There is no reason to use this class directly - TweenLite, TweenMax, and some plugins use it internally.<br /><br />
11 *
12 * <b>Copyright 2011, GreenSock. All rights reserved.</b> This work is subject to the terms in <a href="http://www.greensock.com/terms_of_use.html">http://www.greensock.com/terms_of_use.html</a> or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
13 *
14 * @author Jack Doyle, jack@greensock.com
15 */
16 final public class PropTween {
17 /** Target object **/
18 public var target:Object;
19 /** Name of the property that is being tweened **/
20 public var property:String;
21 /** Starting value **/
22 public var start:Number;
23 /** Amount to change (basically, the difference between the starting value and ending value) **/
24 public var change:Number;
25 /** Alias to associate with the PropTween which is typically the same as the property, but can be different, particularly for plugins. **/
26 public var name:String;
27 /** Priority in the rendering queue. The lower the value the later it will be tweened. Typically all PropTweens get a priority of 0, but some plugins must be rendered later (or earlier) **/
28 public var priority:int;
29 /** If the target of the PropTween is a TweenPlugin, isPlugin should be true. **/
30 public var isPlugin:Boolean;
31 /** Next PropTween in the linked list **/
32 public var nextNode:PropTween;
33 /** Previous PropTween in the linked list **/
34 public var prevNode:PropTween;
35
36 /**
37 * Constructor
38 *
39 * @param target Target object
40 * @param property Name of the property that is being tweened
41 * @param start Starting value
42 * @param change Amount to change (basically, the difference between the starting value and ending value)
43 * @param name Alias to associate with the PropTween which is typically the same as the property, but can be different, particularly for plugins.
44 * @param isPlugin If the target of the PropTween is a TweenPlugin, isPlugin should be true.
45 * @param nextNode Next PropTween in the linked list
46 * @param priority Priority in the rendering queue. The lower the value the later it will be tweened. Typically all PropTweens get a priority of 0, but some plugins must be rendered later (or earlier)
47 */
48 public function PropTween(target:Object, property:String, start:Number, change:Number, name:String, isPlugin:Boolean, nextNode:PropTween=null, priority:int=0) {
49 this.target = target;
50 this.property = property;
51 this.start = start;
52 this.change = change;
53 this.name = name;
54 this.isPlugin = isPlugin;
55 if (nextNode) {
56 nextNode.prevNode = this;
57 this.nextNode = nextNode;
58 }
59 this.priority = priority;
60 }
61 }
62}