lib-flex-animation-code-10-org-as3lib-kitchensync-easing-EasingUtil.ax (swf ) [ flash ] flex
A package of handy methods for working with Easing functions and classes.
author: Mims Wright
Provides a way to call an easing function with code-hinting and type checking (sorta). @throws ArgumentError - If the easing function is passed modifiers that it can't handle. (Don't use them unless they're handled by the function) @throws Error - You may get unexpected results if you use a function that isn't an easing function.
parameter: func - The function to call - Must be an Easing function.
parameter: timeElapsed - The time since the tween began in milliseconds or frames.
parameter: duration - The duration of the tween, in milliseconds or frames.
parameter: mod1 - An optional modifier for the function. Used for tweens such as Back and Elastic.
parameter: mod2 - An optional modifier for the function. Used for tweens such as Elastic.
returns: Number - the result of the easing function.
Uses one of the easing functions to generate an array of results for as many steps as are specified. If steps is 10, you will have an array with length 10.
see: #call()
parameter: func - The function to call - Must be an Easing function.
parameter: steps - The number of results desired for the array.
parameter: mod1 - An optional modifier for the function. Used for tweens such as Back and Elastic.
parameter: mod2 - An optional modifier for the function. Used for tweens such as Elastic.
returns: Array - An array with the results from the easing function over 'steps' iterations.
Creates a new easing function based on two other easing functions. @example Combine cubic in/out easing with a sine wave oscillator. <listing version="3.0"> myTween.easingFunction = @ax-lib-flex-animation-code-10-org-as3lib-kitchensync-easing-EasingUtil.getAveragedFunction(Cubic.easeInOut, Oscillate.sine); </listing>
parameter: easingFunciton1 One of the two easing functions that will be averaged by the new function.
parameter: easingFunciton2 The second of the two easing functions that will be averaged by the new function.
returns: A new easing function that produces values averaged from the two easing functions.
(C) Æliens 19/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.