/src/com/greensock/core/PropTween.as

https://bitbucket.org/HopeSky/mars_nd2d · 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. **/
  7. package 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. * Constructor
  37. *
  38. * @param target Target object
  39. * @param property Name of the property that is being tweened
  40. * @param start Starting value
  41. * @param change Amount to change (basically, the difference between the starting value and ending value)
  42. * @param name Alias to associate with the PropTween which is typically the same as the property, but can be different, particularly for plugins.
  43. * @param isPlugin If the target of the PropTween is a TweenPlugin, isPlugin should be true.
  44. * @param nextNode Next PropTween in the linked list
  45. * @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)
  46. */
  47. public function PropTween(target:Object, property:String, start:Number, change:Number, name:String, isPlugin:Boolean, nextNode:PropTween=null, priority:int=0) {
  48. this.target = target;
  49. this.property = property;
  50. this.start = start;
  51. this.change = change;
  52. this.name = name;
  53. this.isPlugin = isPlugin;
  54. if (nextNode) {
  55. nextNode.prevNode = this;
  56. this.nextNode = nextNode;
  57. }
  58. this.priority = priority;
  59. }
  60. }
  61. }