SpecialProperty.as 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package caurina.transitions {
  2. /**
  3. * SpecialProperty
  4. * A kind of a getter/setter for special properties
  5. *
  6. * @author Zeh Fernando
  7. * @version 1.0.0
  8. * @private
  9. */
  10. public class SpecialProperty {
  11. public var getValue:Function; // (p_obj:Object, p_parameters:Array, p_extra:Object): Number
  12. public var setValue:Function; // (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object): Void
  13. public var parameters:Array;
  14. public var preProcess:Function; // (p_obj:Object, p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): Number
  15. /**
  16. * Builds a new special property object.
  17. *
  18. * @param p_getFunction Function Reference to the function used to get the special property value
  19. * @param p_setFunction Function Reference to the function used to set the special property value
  20. */
  21. public function SpecialProperty (p_getFunction:Function, p_setFunction:Function, p_parameters:Array = null, p_preProcessFunction:Function = null) {
  22. getValue = p_getFunction;
  23. setValue = p_setFunction;
  24. parameters = p_parameters;
  25. preProcess = p_preProcessFunction;
  26. }
  27. /**
  28. * Converts the instance to a string that can be used when trace()ing the object
  29. */
  30. public function toString():String {
  31. var value:String = "";
  32. value += "[SpecialProperty ";
  33. value += "getValue:"+String(getValue);
  34. value += ", ";
  35. value += "setValue:"+String(setValue);
  36. value += ", ";
  37. value += "parameters:"+String(parameters);
  38. value += ", ";
  39. value += "preProcess:"+String(preProcess);
  40. value += "]";
  41. return value;
  42. }
  43. }
  44. }