Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

EaseExponential.as

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * EaseExponential 
 *
 * Exponential-based ease method
 */
package com.senocular.motion {

	public class EaseExponential extends EaseMethod {
		
		private var power:Number;	// the power to ease by
		
		/**
		 * Constructor 
		 */
		public function EaseExponential(power:Number = 2) {
			this.power = power;
		}
		
		public override function call(t:Number):Number {
			return Math.pow(t, power);
		}
	}
}