1  /**
     2   * PropertyInfoObj
     3   * An object containing the updating info for a given property (its starting value, its final value, and a few other things)
     4   *
     5   * @author		Zeh Fernando
     6   * @version		1.0.0
     7   * @private
     8   */
     9  
    10  class caurina.transitions.PropertyInfoObj {
    11  	
    12  	public var valueStart				:Number;	// Starting value of the tweening (null if not started yet)
    13  	public var valueComplete			:Number;	// Final desired value (numerically)
    14  	public var originalValueComplete	:Object;	// Final desired value as declared initially
    15  	public var arrayIndex				:Number;	// Index (if this is an array item)
    16  	public var extra					:Object;	// Additional parameters, used by some special properties
    17  	public var isSpecialProperty		:Boolean;	// Whether or not this is a special property instead of a direct one
    18  	public var hasModifier				:Boolean;	// Whether or not it has a modifier function
    19  	public var modifierFunction			:Function;	// Modifier function, if any
    20  	public var modifierParameters		:Array;		// Additional array of modifier parameters
    21  
    22  	// ==================================================================================================================================
    23  	// CONSTRUCTOR function -------------------------------------------------------------------------------------------------------------
    24  
    25  	/**
    26  	 * Initializes the basic PropertyInfoObj.
    27  	 * 
    28  	 * @param	p_valueStart		Number		Starting value of the tweening (null if not started yet)
    29  	 * @param	p_valueComplete		Number		Final (desired) property value
    30  	 */
    31  	function PropertyInfoObj(p_valueStart:Number, p_valueComplete:Number, p_originalValueComplete:Object, p_arrayIndex:Number, p_extra:Object, p_isSpecialProperty:Boolean, p_modifierFunction:Function, p_modifierParameters:Array) {
    32  		valueStart				=	p_valueStart;
    33  		valueComplete			=	p_valueComplete;
    34  		originalValueComplete	=	p_originalValueComplete;
    35  		arrayIndex				=	p_arrayIndex;
    36  		extra					=	p_extra;
    37  		isSpecialProperty		=	p_isSpecialProperty;
    38  		hasModifier				=	p_modifierFunction != undefined;
    39  		modifierFunction 		=	p_modifierFunction;
    40  		modifierParameters		=	p_modifierParameters;
    41  	}
    42  
    43  
    44  	// ==================================================================================================================================
    45  	// OTHER functions ------------------------------------------------------------------------------------------------------------------
    46  
    47  	/**
    48  	 * Clones this property info and returns the new PropertyInfoObj
    49  	 *
    50  	 * @param	omitEvents		Boolean			Whether or not events such as onStart (and its parameters) should be omitted
    51  	 * @return 					TweenListObj	A copy of this object
    52  	 */
    53  	public function clone():PropertyInfoObj {
    54  		var nProperty:PropertyInfoObj = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
    55  		return nProperty;
    56  	}
    57  
    58  	/**
    59  	 * Returns this object described as a String.
    60  	 *
    61  	 * @return 					String		The description of this object.
    62  	 */
    63  	public function toString():String {
    64  		var returnStr:String = "\n[PropertyInfoObj ";
    65  		returnStr += "valueStart:" + String(valueStart);
    66  		returnStr += ", ";
    67  		returnStr += "valueComplete:" + String(valueComplete);
    68  		returnStr += ", ";
    69  		returnStr += "originalValueComplete:" + String(originalValueComplete);
    70  		returnStr += ", ";
    71  		returnStr += "arrayIndex:" + String(arrayIndex);
    72  		returnStr += ", ";
    73  		returnStr += "extra:" + String(extra);
    74  		returnStr += ", ";
    75  		returnStr += "isSpecialProperty:" + String(isSpecialProperty);
    76  		returnStr += ", ";
    77  		returnStr += "hasModifier:" + String(hasModifier);
    78  		returnStr += ", ";
    79  		returnStr += "modifierFunction:" + String(modifierFunction);
    80  		returnStr += ", ";
    81  		returnStr += "modifierParameters:" + String(modifierParameters);
    82  		returnStr += "]\n";
    83  		return returnStr;
    84  	}
    85  	
    86  }
    87