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
package com.senocular.gyro {

	public class EaseExponential extends Ease {
		
		public var power:Number;
		
		public function EaseExponential(power:Number = 2, behavior:int = Ease.IN, amount:Number = 1, change:Number = .5) {
			this.power = power;
			super(behavior, amount, change, easeMethod);
		}
		
		override public function easeMethod(t:Number):Number {
			return Math.pow(t, power);
		}
	}
}