flash : update recorder with size and tween.
authorcavaliet
Wed, 06 Jun 2012 18:31:09 +0200
changeset 11 6cab7e0b1678
parent 9 4763bcd087a2
child 12 fa256a9f8d05
flash : update recorder with size and tween.
script/record_mic/com/eclecticdesignstudio/motion/Actuate.as
script/record_mic/com/eclecticdesignstudio/motion/MotionPath.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/FilterActuator.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/GenericActuator.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/MethodActuator.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/MotionInternal.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/MotionPathActuator.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/PropertyDetails.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/SimpleActuator.as
script/record_mic/com/eclecticdesignstudio/motion/actuators/TransformActuator.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Back.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Cubic.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Elastic.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Expo.as
script/record_mic/com/eclecticdesignstudio/motion/easing/IEasing.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Linear.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Quad.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Quart.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Quint.as
script/record_mic/com/eclecticdesignstudio/motion/easing/Sine.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/BackEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/BackEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/BackEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/CubicEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/CubicEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/CubicEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ElasticEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ElasticEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ElasticEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ExpoEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ExpoEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ExpoEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/LinearEaseNone.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuadEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuadEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuadEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuartEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuartEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuartEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuintEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuintEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuintEaseOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/SineEaseIn.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/SineEaseInOut.as
script/record_mic/com/eclecticdesignstudio/motion/easing/equations/SineEaseOut.as
script/record_mic/record_mic.as
script/record_mic/record_mic.swf
script/record_mic/record_mic/DOMDocument.xml
script/record_mic/record_mic/LIBRARY/RecordBtn.xml
script/record_mic/record_mic/LIBRARY/mic/Bouton Microphone.xml
script/record_mic/record_mic/LIBRARY/mic/fond.xml
script/record_mic/record_mic/LIBRARY/mic/micro.xml
script/record_mic/record_mic/LIBRARY/record.png
script/record_mic/record_mic/LIBRARY/record2.png
script/record_mic/record_mic/META-INF/metadata.xml
script/record_mic/record_mic/PublishSettings.xml
script/record_mic/record_mic/bin/SymDepend.cache
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/Actuate.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,483 @@
+package com.eclecticdesignstudio.motion {
+	
+	
+	import com.eclecticdesignstudio.motion.actuators.GenericActuator;
+	import com.eclecticdesignstudio.motion.actuators.MethodActuator;
+	import com.eclecticdesignstudio.motion.actuators.MotionInternal;
+	import com.eclecticdesignstudio.motion.actuators.MotionPathActuator;
+	import com.eclecticdesignstudio.motion.actuators.SimpleActuator;
+	import com.eclecticdesignstudio.motion.actuators.TransformActuator;
+	import com.eclecticdesignstudio.motion.easing.Expo;
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.utils.Dictionary;
+	
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.23
+	 */
+	public class Actuate {
+		
+		
+		public static var defaultActuator:Class = SimpleActuator;
+		public static var defaultEase:IEasing = Expo.easeOut;
+		private static var targetLibraries:Dictionary = new Dictionary (true);
+		
+		
+		/**
+		 * Copies properties from one object to another. Conflicting tweens are stopped automatically
+		 * @example		<code>Actuate.apply (MyClip, { alpha: 1 } );</code>
+		 * @param	target		The object to copy to
+		 * @param	properties		The object to copy from
+		 * @param	customActuator		A custom actuator to use instead of the default (Optional)
+		 * @return		The current actuator instance, which can be used to apply properties like onComplete or onUpdate handlers
+		 */
+		public static function apply (target:Object, properties:Object, customActuator:Class = null):GenericActuator {
+			
+			stop (target, properties);
+			
+			var actuateClass:Class = customActuator || defaultActuator;
+			var actuator:GenericActuator = new actuateClass (target, 0, properties);
+			
+			actuator.MotionInternal::apply ();
+			
+			return actuator;
+			
+		}
+		
+		
+		/**
+		 * Creates a new effects tween 
+		 * @param	target		The object to tween
+		 * @param	duration		The length of the tween in seconds
+		 * @param	overwrite		Sets whether previous tweens for the same target and properties will be overwritten (Default is true)
+		 * @return		An EffectsOptions instance, which is used to select the kind of effect you would like to apply to the target
+		 */
+		public static function effects (target:DisplayObject, duration:Number, overwrite:Boolean = true):EffectsOptions {
+			
+			return new EffectsOptions (target, duration, overwrite);
+			
+		}
+		
+		
+		private static function getLibrary (target:Object):Dictionary {
+			
+			if (!targetLibraries[target]) {
+				
+				targetLibraries[target] = new Dictionary (true);
+				
+			}
+			
+			return targetLibraries[target];
+			
+		}
+		
+		
+		/**
+		 * Creates a new MotionPath tween
+		 * @param	target		The object to tween
+		 * @param	duration		The length of the tween in seconds
+		 * @param	properties		An object containing a motion path for each property you wish to tween
+		 * @param	overwrite		Sets whether previous tweens for the same target and properties will be overwritten (Default is true)
+		 * @return		The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate
+		 */
+		public static function motionPath (target:Object, duration:Number, properties:Object, overwrite:Boolean = true):GenericActuator {
+			
+			return tween (target, duration, properties, overwrite, MotionPathActuator);
+			
+		}
+		
+		
+		/**
+		 * Pauses tweens for the specified target objects
+		 * @param	... targets		The target objects which will have their tweens paused. Passing no value pauses tweens for all objects
+		 */
+		public static function pause (... targets:Array):void {
+			
+			var actuator:GenericActuator;
+			var library:Dictionary;
+			
+			if (targets.length > 0) {
+				
+				for each (var target:Object in targets) {
+					
+					library = getLibrary (target);
+					
+					for each (actuator in library) {
+						
+						actuator.MotionInternal::pause ();
+						
+					}
+					
+				}
+				
+			} else {
+				
+				for each (library in targetLibraries) {
+					
+					for each (actuator in library) {
+						
+						actuator.MotionInternal::pause ();
+						
+					}
+					
+				}
+				
+			}
+			
+		}
+		
+		
+		/**
+		 * Resets Actuate by stopping and removing tweens for all objects
+		 */
+		public static function reset ():void {
+			
+			var actuator:GenericActuator;
+			var library:Dictionary;
+			
+			for each (library in targetLibraries) {
+				
+				for each (actuator in library) {
+					
+					actuator.MotionInternal::stop (null, false, false);
+					
+				}
+				
+			}
+			
+			targetLibraries = new Dictionary (true);
+			
+		}
+		
+		
+		/**
+		 * Resumes paused tweens for the specified target objects
+		 * @param	... targets		The target objects which will have their tweens resumed. Passing no value resumes tweens for all objects
+		 */
+		public static function resume (... targets:Array):void {
+			
+			var actuator:GenericActuator;
+			var library:Dictionary;
+			
+			if (targets.length > 0) {
+				
+				for each (var target:Object in targets) {
+					
+					library = getLibrary (target);
+					
+					for each (actuator in library) {
+						
+						actuator.MotionInternal::resume ();
+						
+					}
+					
+				}
+				
+			} else {
+				
+				for each (library in targetLibraries) {
+					
+					for each (actuator in library) {
+						
+						actuator.MotionInternal::resume ();
+						
+					}
+					
+				}
+				
+			}
+			
+		}
+		
+		
+		/**
+		 * Stops all tweens for an individual object
+		 * @param	target		The target object which will have its tweens stopped
+		 * @param  properties		A string, array or object which contains the properties you wish to stop, like "alpha", [ "x", "y" ] or { alpha: null }. Passing no value removes all tweens for the object (Optional)
+		 * @param	complete		If tweens should apply their final target values before stopping. Default is false (Optional) 
+		 */
+		public static function stop (target:Object, properties:Object = null, complete:Boolean = false):void {
+			
+			if (target) {
+				
+				var actuator:GenericActuator;
+				var library:Dictionary = getLibrary (target);
+				
+				var temp:Object;
+				
+				if (properties is String) {
+					
+					temp = new Object ();
+					temp[properties] = null;
+					properties = temp;
+					
+				} else if (properties is Array) {
+					
+					temp = new Object ();
+					
+					for each (var propertyName:String in properties) {
+						
+						temp[propertyName] = null;
+						
+					}
+					
+					properties = temp;
+					
+				}
+				
+				for each (actuator in library) {
+					
+					actuator.MotionInternal::stop (properties, complete, true);
+					
+				}
+				
+			}
+			
+		}
+		
+		
+		/**
+		 * Creates a tween-based timer, which is useful for synchronizing function calls with other animations
+		 * @example		<code>Actuate.timer (1).onComplete (trace, "Timer is now complete");</code>
+		 * @param	duration		The length of the timer in seconds
+		 * @param	customActuator		A custom actuator to use instead of the default (Optional)
+		 * @return		The current actuator instance, which can be used to apply properties like onComplete or to gain a reference to the target timer object
+		 */
+		public static function timer (duration:Number, customActuator:Class = null):GenericActuator {
+			
+			return tween (new TweenTimer (0), duration, new TweenTimer (1), false, customActuator);
+			
+		}
+		
+		
+		/**
+		 * Creates a new transform tween
+		 * @example		<code>Actuate.transform (MyClip, 1).color (0xFF0000);</code>
+		 * @param	target		The object to tween
+		 * @param	duration		The length of the tween in seconds
+		 * @param	overwrite		Sets whether previous tweens for the same target and properties will be overwritten (Default is true)
+		 * @return		A TransformOptions instance, which is used to select the kind of transform you would like to apply to the target
+		 */
+		public static function transform (target:Object, duration:Number = 0, overwrite:Boolean = true):TransformOptions {
+			
+			return new TransformOptions (target, duration, overwrite);
+			
+		}
+		
+		
+		/**
+		 * Creates a new tween
+		 * @example		<code>Actuate.tween (MyClip, 1, { alpha: 1 } ).onComplete (trace, "MyClip is now visible");</code>
+		 * @param	target		The object to tween
+		 * @param	duration		The length of the tween in seconds
+		 * @param	properties		The end values to tween the target to
+		 * @param	overwrite			Sets whether previous tweens for the same target and properties will be overwritten (Default is true)
+		 * @param	customActuator		A custom actuator to use instead of the default (Optional)
+		 * @return		The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate
+		 */ 
+		public static function tween (target:Object, duration:Number, properties:Object, overwrite:Boolean = true, customActuator:Class = null):GenericActuator {
+			
+			if (target) {
+				
+				if (duration > 0) {
+					
+					var actuateClass:Class = customActuator || defaultActuator;
+					var actuator:GenericActuator = new actuateClass (target, duration, properties);
+					
+					var library:Dictionary = getLibrary (actuator.target);
+					
+					if (overwrite) {
+						
+						for each (var childActuator:GenericActuator in library) {
+							
+							childActuator.MotionInternal::stop (actuator.properties, false, false);
+							
+						}
+						
+					}
+					
+					library[actuator] = actuator;
+					actuator.MotionInternal::move ();
+					
+					return actuator;
+					
+				} else {
+					
+					return apply (target, properties, customActuator);
+					
+				}
+				
+			}
+			
+			return null;
+			
+		}
+		
+		
+		MotionInternal static function unload (actuator:GenericActuator):void {
+			
+			var library:Dictionary = getLibrary (actuator.target);
+			delete library[actuator];
+			
+		}
+		
+		
+		/**
+		 * Creates a new tween that updates a method rather than setting the properties of an object
+		 * @example		<code>Actuate.update (trace, 1, ["Value: ", 0], ["", 1]).onComplete (trace, "Finished tracing values between 0 and 1");</code>
+		 * @param	target		The method to update		
+		 * @param	duration		The length of the tween in seconds
+		 * @param	start		The starting parameters of the method call. You may use both numeric and non-numeric values
+		 * @param	end		The ending parameters of the method call. You may use both numeric and non-numeric values, but the signature should match the start parameters
+		 * @param	overwrite		Sets whether previous tweens for the same target and properties will be overwritten (Default is true)
+		 * @return		The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate
+		 */
+		public static function update (target:Function, duration:Number, start:Array = null, end:Array = null, overwrite:Boolean = true):GenericActuator {
+			
+			var properties:Object = { start: start, end: end };
+			
+			return tween (target, duration, properties, overwrite, MethodActuator);
+			
+		}
+		
+		
+	}
+	
+	
+}
+
+
+import com.eclecticdesignstudio.motion.actuators.FilterActuator;
+import com.eclecticdesignstudio.motion.actuators.GenericActuator;
+import com.eclecticdesignstudio.motion.actuators.TransformActuator;
+import com.eclecticdesignstudio.motion.Actuate;
+import flash.display.DisplayObject;
+import flash.filters.BitmapFilter;
+import flash.filters.ColorMatrixFilter;
+import flash.geom.Matrix;
+
+
+class EffectsOptions {
+	
+	
+	protected var duration:Number;
+	protected var overwrite:Boolean;
+	protected var target:DisplayObject;
+	
+	
+	public function EffectsOptions (target:DisplayObject, duration:Number, overwrite:Boolean) {
+		
+		this.target = target;
+		this.duration = duration;
+		this.overwrite = overwrite;
+		
+	}
+	
+	
+	/**
+	 * Creates a new BitmapFilter tween
+	 * @param	reference		A reference to the target's filter, which can be an array index or the class of the filter
+	 * @param	properties		The end properties to use for the tween
+	 * @return		The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate
+	 */
+	public function filter (reference:*, properties:Object):GenericActuator {
+		
+		properties.filter = reference;
+		
+		return Actuate.tween (target, duration, properties, overwrite, FilterActuator);
+		
+	}
+	
+	
+}
+
+
+class TransformOptions {
+	
+	
+	protected var duration:Number;
+	protected var overwrite:Boolean;
+	protected var target:Object;
+	
+	
+	public function TransformOptions (target:Object, duration:Number, overwrite:Boolean) {
+		
+		this.target = target;
+		this.duration = duration;
+		this.overwrite = overwrite;
+		
+	}
+	
+	
+	/**
+	 * Creates a new ColorTransform tween
+	 * @param	color		The color value
+	 * @param	strength		The percentage amount of tint to apply (Default is 1)
+	 * @param	alpha		The end alpha of the target. If you wish to tween alpha and tint simultaneously, you must do them both as part of the ColorTransform. A value of null will make no change to the alpha of the object (Default is null)
+	 * @return		The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate
+	 */
+	public function color (value:Number = 0x000000, strength:Number = 1, alpha:* = null):GenericActuator {
+		
+		var properties:Object = { colorValue: value, colorStrength: strength };
+		
+		if (alpha is Number) {
+			
+			properties.colorAlpha = alpha;
+			
+		}
+		
+		return Actuate.tween (target, duration, properties, overwrite, TransformActuator);
+		
+	}
+	
+	
+	/**
+	 * Creates a new SoundTransform tween
+	 * @param	volume		The end volume for the target, or null if you would like to ignore this property (Default is null)
+	 * @param	pan		The end pan for the target, or null if you would like to ignore this property (Default is null)
+	 * @return		The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate
+	 */
+	public function sound (volume:* = null, pan:* = null):GenericActuator {
+		
+		var properties:Object = new Object ();
+		
+		if (volume is Number) {
+			
+			properties.soundVolume = volume;
+			
+		}
+		
+		if (pan is Number) {
+			
+			properties.soundPan = pan;
+			
+		}
+		
+		return Actuate.tween (target, duration, properties, overwrite, TransformActuator);
+		
+	}
+	
+	
+}
+
+
+class TweenTimer {
+	
+	
+	public var progress:Number;
+	
+	
+	public function TweenTimer (progress:Number):void {
+		
+		this.progress = progress;
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/MotionPath.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,204 @@
+package com.eclecticdesignstudio.motion {
+	
+	
+	import com.eclecticdesignstudio.motion.actuators.MotionInternal;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class MotionPath {
+		
+		
+		public var start:Number;
+		
+		protected var paths:Array;
+		protected var totalStrength:Number;
+		
+		
+		public function MotionPath () {
+			
+			paths = new Array ();
+			start = 0;
+			totalStrength = 0;
+			
+		}
+		
+		
+		protected function addPath (path:BezierPath):void {
+			
+			paths.push (path);
+			totalStrength += path.strength;
+			
+		}
+		
+		
+		/**
+		 * Creates a motion path using a bezier curve
+		 * @param	end		The position of the end point for the curve
+		 * @param	control		The position of the control point for the curve, which affects its angle and midpoint
+		 * @param	strength		The degree of emphasis that should be placed on this segment . If a motion path contains multiple segments with the same strength, they all receive equal emphasis (Default is 1)
+		 * @return		The new motion path instance
+		 */
+		public static function bezier (end:Number, control:Number, strength:Number = 1):MotionPath {
+			
+			return new MotionPath ().bezier (end, control, strength);
+			
+		}
+		
+		
+		/**
+		 * Adds a bezier curve to the current motion path
+		 * @param	end		The position of the end point for the curve
+		 * @param	control		The position of the control point for the curve, which affects its angle and midpoint
+		 * @param	strength		The degree of emphasis that should be placed on this segment . If a motion path contains multiple segments with the same strength, they all receive equal emphasis (Default is 1)
+		 * @return		The current motion path instance
+		 */
+		public function bezier (end:Number, control:Number, strength:Number = 1):MotionPath {
+			
+			addPath (new BezierPath (end, control, strength));
+			
+			return this;
+			
+		}
+		
+		
+		MotionInternal function calculate (k:Number):Number {
+			
+			if (paths.length === 1) {
+				
+				return (paths[0] as Object).calculate (start, k);
+				
+			} else {
+				
+				var ratio:Number = k * totalStrength;
+				var lastEnd:Number = start;
+				
+				for each (var path:BezierPath in paths) {
+					
+					if (ratio > path.strength) {
+						
+						ratio -= path.strength;
+						lastEnd = path.end;
+						
+					} else {
+						
+						return path.calculate (lastEnd, ratio / path.strength);
+						
+					}
+					
+				}
+				
+			}
+			
+			return 0;
+			
+		}
+		
+		
+		/**
+		 * Creates a motion path using a line
+		 * @param	end		The position of the end point for the line
+		 * @param	strength		The degree of emphasis that should be placed on this segment . If a motion path contains multiple segments with the same strength, they all receive equal emphasis (Default is 1)
+		 * @return		The new motion path instance
+		 */
+		public static function line (end:Number, strength:Number = 1):MotionPath {
+			
+			return new MotionPath ().line (end, strength);
+			
+		}
+		
+		
+		/**
+		 * Adds a line to the current motion path
+		 * @param	end		The position of the end point for the line
+		 * @param	strength		The degree of emphasis that should be placed on this segment . If a motion path contains multiple segments with the same strength, they all receive equal emphasis (Default is 1)
+		 * @return		The current motion path instance
+		 */
+		public function line (end:Number, strength:Number = 1):MotionPath {
+			
+			addPath (new LinearPath (end, strength));
+			
+			return this;
+			
+		}
+		
+		
+		
+		
+		// Get & Set Methods
+		
+		
+		
+		
+		MotionInternal function get end ():Number {
+			
+			if (paths.length > 0) {
+				
+				var path:BezierPath = paths[paths.length - 1];
+				return path.end;
+				
+			} else {
+				
+				return NaN;
+				
+			}
+			
+		}
+		
+	}
+	
+
+}
+
+
+
+
+class BezierPath {
+	
+	
+	public var control:Number;
+	public var end:Number;
+	public var strength:Number;
+	
+	
+	public function BezierPath (end:Number, control:Number, strength:Number) {
+		
+		this.end = end;
+		this.control = control;
+		this.strength = strength;
+		
+	}
+	
+	
+	public function calculate (start:Number, k:Number):Number {
+		
+		return (1 - k) * (1 - k) * start + 2 * (1 - k) * k * control + k * k * end;
+		
+	}
+	
+	
+}
+
+
+class LinearPath extends BezierPath {
+	
+	
+	public function LinearPath (end:Number, strength:Number) {
+		
+		super (end, 0, strength);
+		
+	}
+	
+	
+	public override function calculate (start:Number, k:Number):Number {
+		
+		return start + k * (end - start);
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/FilterActuator.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,124 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	import flash.display.DisplayObject;
+	import flash.filters.BitmapFilter;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class FilterActuator extends SimpleActuator {
+		
+		
+		protected var filter:BitmapFilter;
+		protected var filterClass:Class;
+		protected var filterIndex:int = -1;
+		
+		
+		public function FilterActuator (target:Object, duration:Number, properties:Object) {
+			
+			super (target, duration, properties);
+			
+			if (properties.filter is Class) {
+				
+				filterClass = properties.filter;
+				
+				for each (var filter:BitmapFilter in (target as DisplayObject).filters) {
+					
+					if (filter is filterClass) {
+						
+						this.filter = filter;
+						
+					}
+					
+				}
+				
+			} else {
+				
+				filterIndex = properties.filter;
+				this.filter = (target as DisplayObject).filters [filterIndex];
+				
+			}
+			
+		}
+		
+		
+		MotionInternal override function apply ():void {
+			
+			for (var propertyName:String in properties) {
+				
+				if (propertyName != "filter") {
+					
+					filter[propertyName] = properties[propertyName];
+					
+				}
+				
+			}
+			
+			var filters:Array = target.filters;
+			filters[properties.filter] = filter;
+			target.filters = filters;
+			
+		}
+		
+		
+		protected override function initialize ():void {
+			
+			var details:PropertyDetails;
+			var start:Number;
+			
+			for (var propertyName:String in properties) {
+				
+				if (propertyName != "filter") {
+					
+					start = Number (filter[propertyName]);
+					details = new PropertyDetails (filter, propertyName, start, Number (properties[propertyName] - start));
+					propertyDetails.push (details);
+					
+				}
+				
+			}
+			
+			detailsLength = propertyDetails.length;
+			initialized = true;
+			
+		}
+		
+		
+		MotionInternal override function update (currentTime:Number):void {
+			
+			super.update (currentTime);
+			
+			var filters:Array = (target as DisplayObject).filters;
+			
+			if (filterIndex > -1) {
+				
+				filters[properties.filter] = filter;
+				
+			} else {
+				
+				for (var i:uint = 0; i < filters.length; i++) {
+					
+					if (filters[i] is filterClass) {
+						
+						filters[i] = filter;
+						
+					}
+					
+				}
+				
+			}
+			
+			target.filters = filters;
+			
+		}
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/GenericActuator.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,274 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	import com.eclecticdesignstudio.motion.Actuate;
+	import flash.events.Event;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class GenericActuator {
+		
+		
+		MotionInternal var duration:Number;
+		MotionInternal var properties:Object;
+		MotionInternal var target:Object;
+		
+		MotionInternal var autoVisible:Boolean = true;
+		MotionInternal var delay:Number = 0;
+		MotionInternal var ease:IEasing;
+		MotionInternal var onUpdate:Function;
+		MotionInternal var onUpdateParams:Array;
+		MotionInternal var onComplete:Function;
+		MotionInternal var onCompleteParams:Array;
+		MotionInternal var reflect:Boolean = false;
+		MotionInternal var repeat:int = 0;
+		MotionInternal var reverse:Boolean = false;
+		MotionInternal var smartRotation:Boolean = false;
+		MotionInternal var snapping:Boolean = false;
+		MotionInternal var special:Boolean = false;
+		
+		
+		public function GenericActuator (target:Object, duration:Number, properties:Object) {
+			
+			this.target = target;
+			this.properties = properties;
+			this.duration = duration;
+			
+			MotionInternal::ease = Actuate.defaultEase;
+			
+		}
+		
+		
+		MotionInternal function apply ():void {
+			
+			for (var propertyName:String in properties) {
+				
+				target[propertyName] = properties[propertyName];
+				
+			}
+			
+		}
+		
+		
+		/**
+		 * Flash performs faster when objects are set to visible = false rather than only alpha = 0. autoVisible toggles automatically based on alpha values
+		 * @param	value		Whether autoVisible should be enabled (Default is true)
+		 * @return		The current actuator instance
+		 */
+		public function autoVisible (value:Boolean = true):GenericActuator {
+			
+			MotionInternal::autoVisible = value;
+			
+			return this;
+			
+		}
+		
+		
+		protected function change ():void {
+			
+			if (MotionInternal::onUpdate != null) {
+				
+				MotionInternal::onUpdate.apply (null, MotionInternal::onUpdateParams);
+				
+			}
+			
+		}
+		
+		
+		protected function complete (sendEvent:Boolean = true):void {
+			
+			if (sendEvent) {
+				
+				change ();
+				
+				if (MotionInternal::onComplete != null) {
+					
+					MotionInternal::onComplete.apply (null, MotionInternal::onCompleteParams);
+					
+				}
+				
+			}
+			
+			Actuate.unload (this);
+			
+		}
+		
+		
+		/**
+		 * Increases the delay before a tween is executed
+		 * @param	duration		The amount of seconds to delay
+		 * @return		The current actuator instance
+		 */
+		public function delay (duration:Number):GenericActuator {
+			
+			MotionInternal::delay = duration;
+			
+			return this;
+			
+		}
+		
+		
+		/**
+		 * Sets the easing which is used when running the tween
+		 * @param	easing		An easing equation, like Elastic.easeIn or Quad.easeOut
+		 * @return		The current actuator instance
+		 */
+		public function ease (easing:IEasing):GenericActuator {
+			
+			MotionInternal::ease = easing;
+			
+			return this;
+			
+		}
+		
+		
+		MotionInternal function move ():void {
+			
+			
+			
+		}
+		
+		
+		/**
+		 * Defines a function which will be called when the tween updates
+		 * @param	handler		The function you would like to be called
+		 * @param	parameters		Parameters you would like to pass to the handler function when it is called
+		 * @return		The current actuator instance
+		 */
+		public function onUpdate (handler:Function, ... parameters:Array):GenericActuator {
+			
+			MotionInternal::onUpdate = handler;
+			MotionInternal::onUpdateParams = parameters;
+			
+			return this;
+			
+		}
+		
+		
+		/**
+		 * Defines a function which will be called when the tween finishes
+		 * @param	handler		The function you would like to be called
+		 * @param	parameters		Parameters you would like to pass to the handler function when it is called
+		 * @return		The current actuator instance
+		 */
+		public function onComplete (handler:Function, ... parameters:Array):GenericActuator {
+			
+			MotionInternal::onComplete = handler;
+			MotionInternal::onCompleteParams = parameters;
+			
+			if (MotionInternal::duration == 0) {
+				
+				complete ();
+				
+			}
+			
+			return this;
+			
+		}
+		
+		
+		MotionInternal function pause ():void {
+			
+			
+			
+		}
+		
+		
+		/**
+		 * Automatically changes the reverse value when the tween repeats. Repeat must be enabled for this to have any effect
+		 * @param	value		Whether reflect should be enabled (Default is true)
+		 * @return		The current actuator instance
+		 */
+		public function reflect (value:Boolean = true):GenericActuator {
+			
+			MotionInternal::reflect = true;
+			MotionInternal::special = true;
+			
+			return this;
+			
+		}
+		
+		
+		/**
+		 * Repeats the tween after it finishes
+		 * @param	times		The number of times you would like the tween to repeat, or -1 if you would like to repeat the tween indefinitely (Default is -1)
+		 * @return		The current actuator instance
+		 */
+		public function repeat (times:int = -1):GenericActuator {
+			
+			MotionInternal::repeat = times;
+			
+			return this;
+			
+		}
+		
+		
+		MotionInternal function resume ():void {
+			
+			
+			
+		}
+		
+		
+		/**
+		 * Sets if the tween should be handled in reverse
+		 * @param	value		Whether the tween should be reversed (Default is true)
+		 * @return		The current actuator instance
+		 */
+		public function reverse (value:Boolean = true):GenericActuator {
+			
+			MotionInternal::reverse = value;
+			special = true;
+			
+			return this;
+			
+		}
+		
+		
+		/**
+		 * Enabling smartRotation can prevent undesired results when tweening rotation values
+		 * @param	value		Whether smart rotation should be enabled (Default is true)
+		 * @return		The current actuator instance
+		 */
+		public function smartRotation (value:Boolean = true):GenericActuator {
+			
+			MotionInternal::smartRotation = value;
+			special = true;
+			
+			return this;
+			
+		}
+		
+		
+		/**
+		 * Snapping causes tween values to be rounded automatically
+		 * @param	value		Whether tween values should be rounded (Default is true)
+		 * @return		The current actuator instance
+		 */
+		public function snapping (value:Boolean = true):GenericActuator {
+			
+			MotionInternal::snapping = value;
+			special = true;
+			
+			return this;
+			
+		}
+		
+		
+		MotionInternal function stop (properties:Object, complete:Boolean, sendEvent:Boolean):void {
+			
+			
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/MethodActuator.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,93 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	import com.eclecticdesignstudio.motion.actuators.MotionInternal;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class MethodActuator extends SimpleActuator {
+		
+		
+		protected var tweenProperties:Object = new Object ();
+		
+		
+		public function MethodActuator (target:Object, duration:Number, properties:Object) {
+			
+			super (target, duration, properties);
+			
+			if (!properties.start) {
+				
+				properties.start = new Array ();
+				
+			}
+			
+			if (!properties.end) {
+				
+				properties.end = properties.start;
+				
+			}
+			
+		}
+		
+		
+		MotionInternal override function apply ():void {
+			
+			(target as Function).apply (null, properties.end);
+			
+		}
+		
+		
+		protected override function initialize ():void {
+			
+			var details:PropertyDetails;
+			var propertyName:String;
+			var start:Object;
+			
+			for (var i:uint = 0; i < (properties.start as Array).length; i++) {
+				
+				propertyName = "param" + i;
+				start = properties.start[i];
+				
+				tweenProperties[propertyName] = start;
+				
+				if (start is Number) {
+					
+					details = new PropertyDetails (tweenProperties, propertyName, start as Number, Number (properties.end[i]) - (start as Number));
+					propertyDetails.push (details);
+					
+				}
+				
+			}
+			
+			detailsLength = propertyDetails.length;
+			initialized = true;
+			
+		}
+		
+		
+		MotionInternal override function update (currentTime:Number):void {
+			
+			super.update (currentTime);
+			
+			var parameters:Array = new Array ();
+			
+			for (var i:uint = 0; i < properties.start.length; i++) {
+				
+				parameters.push (tweenProperties["param" + i]);
+				
+			}
+			
+			(target as Function).apply (null, parameters);
+			
+		}
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/MotionInternal.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,7 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	public namespace MotionInternal;
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/MotionPathActuator.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,198 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	import com.eclecticdesignstudio.motion.MotionPath;
+	import flash.utils.getTimer;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class MotionPathActuator extends SimpleActuator {
+		
+		
+		public function MotionPathActuator (target:Object, duration:Number, properties:Object) {
+			
+			super (target, duration, properties);
+			
+		}
+		
+		
+		MotionInternal override function apply ():void {
+			
+			for (var propertyName:String in properties) {
+				
+				target[propertyName] = (properties[propertyName] as MotionPath).MotionInternal::end;
+				
+			}
+			
+		}
+		
+		
+		protected override function initialize ():void {
+			
+			var details:PropertyPathDetails;
+			var path:MotionPath;
+			
+			for (var propertyName:String in properties) {
+				
+				path = properties[propertyName] as MotionPath;
+				
+				if (path) {
+					
+					path.start = Number (target[propertyName]);
+					details = new PropertyPathDetails (target, propertyName, path);
+					propertyDetails.push (details);
+					
+				}
+				
+			}
+			
+			detailsLength = propertyDetails.length;
+			initialized = true;
+			
+		}
+		
+		
+		MotionInternal override function update (currentTime:Number):void {
+			
+			if (!paused) {
+				
+				var details:PropertyPathDetails;
+				var easing:Number;
+				var i:uint;
+				
+				var tweenPosition:Number = (currentTime - timeOffset) / duration;
+				
+				if (tweenPosition > 1) {
+					
+					tweenPosition = 1;
+					
+				}
+				
+				if (!initialized) {
+					
+					initialize ();
+					
+				}
+				
+				if (!MotionInternal::special) {
+					
+					easing = MotionInternal::ease.calculate (tweenPosition);
+					
+					for (i = 0; i < detailsLength; ++i) {
+						
+						details = propertyDetails[i];
+						details.target[details.propertyName] = details.path.MotionInternal::calculate (easing);
+						
+					}
+					
+				} else {
+					
+					if (!MotionInternal::reverse) {
+						
+						easing = MotionInternal::ease.calculate (tweenPosition);
+						
+					} else {
+						
+						easing = MotionInternal::ease.calculate (1 - tweenPosition);
+						
+					}
+					
+					var endValue:Number;
+					
+					for (i = 0; i < detailsLength; ++i) {
+						
+						details = propertyDetails[i];
+						
+						if (!MotionInternal::snapping) {
+							
+							details.target[details.propertyName] = details.path.MotionInternal::calculate (easing);
+							
+						} else {
+							
+							details.target[details.propertyName] = Math.round (details.path.MotionInternal::calculate (easing));
+							
+						}
+						
+					}
+					
+				}
+				
+				if (tweenPosition === 1) {
+					
+					if (MotionInternal::repeat === 0) {
+						
+						active = false;
+						
+						if (toggleVisible && target.alpha === 0) {
+							
+							target.visible = false;
+							
+						}
+						
+						complete (true);
+						return;
+						
+					} else {
+						
+						if (MotionInternal::reflect) {
+							
+							MotionInternal::reverse = !MotionInternal::reverse;
+							
+						}
+						
+						startTime = currentTime;
+						timeOffset = startTime + MotionInternal::delay;
+						
+						if (MotionInternal::repeat > 0) {
+							
+							MotionInternal::repeat --;
+							
+						}
+						
+					}
+					
+				}
+				
+				if (sendChange) {
+					
+					change ();
+					
+				}
+				
+			}
+			
+		}
+		
+		
+	}
+
+	
+}
+
+
+import com.eclecticdesignstudio.motion.MotionPath;
+
+
+class PropertyPathDetails {
+	
+	
+	public var target:Object;
+	public var path:MotionPath;
+	public var propertyName:String;
+	
+	
+	public function PropertyPathDetails (target:Object, propertyName:String, path:MotionPath) {
+		
+		this.target = target;
+		this.propertyName = propertyName;
+		this.path = path;
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/PropertyDetails.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,29 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	public class PropertyDetails{
+		
+		
+		public var target:Object;
+		public var propertyName:String;
+		public var start:Number;
+		public var change:Number;
+		
+		
+		public function PropertyDetails (target:Object, propertyName:String, start:Number, change:Number):void {
+			
+			this.target = target;
+			this.propertyName = propertyName;
+			this.start = start;
+			this.change = change;
+			
+		}
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/SimpleActuator.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,380 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	import flash.display.DisplayObject;
+	import flash.display.Shape;
+	import flash.events.Event;
+	import flash.utils.Dictionary;
+	import flash.utils.getTimer;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class SimpleActuator extends GenericActuator {
+		
+		
+		MotionInternal var timeOffset:Number;
+		
+		protected static var actuators:Array = new Array ();
+		protected static var actuatorsLength:uint = 0;
+		protected static var shape:Shape;
+		
+		protected var active:Boolean = true;
+		protected var cacheVisible:Boolean;
+		protected var detailsLength:uint;
+		protected var initialized:Boolean;
+		protected var paused:Boolean;
+		protected var pauseTime:Number;
+		protected var propertyDetails:Array = new Array ();
+		protected var sendChange:Boolean = false;
+		protected var setVisible:Boolean;
+		protected var startTime:Number = getTimer () / 1000;
+		protected var toggleVisible:Boolean;
+		
+		
+		public function SimpleActuator (target:Object, duration:Number, properties:Object) {
+			
+			super (target, duration, properties);
+			
+			if (!shape) {
+				
+				shape = new Shape ();
+				shape.addEventListener (Event.ENTER_FRAME, shape_onEnterFrame);
+				
+			}
+			
+		}
+		
+		
+		/**
+		 * @inheritDoc
+		 */
+		public override function autoVisible (value:Boolean = true):GenericActuator {
+			
+			MotionInternal::autoVisible = value;
+			
+			if (!value) {
+				
+				toggleVisible = false;
+				
+				if (setVisible) {
+					
+					target.visible = cacheVisible;
+					
+				}
+				
+			}
+			
+			return this;
+			
+		}
+		
+		
+		/**
+		 * @inheritDoc
+		 */
+		public override function delay (duration:Number):GenericActuator {
+			
+			MotionInternal::delay = duration;
+			timeOffset = startTime + duration;
+			
+			return this;
+			
+		}
+		
+		
+		protected function initialize ():void {
+			
+			var details:PropertyDetails;
+			var start:Number;
+			
+			for (var propertyName:String in properties) {
+				
+				start = Number (target[propertyName]);
+				details = new PropertyDetails (target, propertyName, start, Number (properties[propertyName] - start));
+				propertyDetails.push (details);
+				
+			}
+			
+			detailsLength = propertyDetails.length;
+			initialized = true;
+			
+		}
+		
+		
+		MotionInternal override function move ():void {
+			
+			toggleVisible = ("alpha" in properties && target is DisplayObject);
+			
+			if (toggleVisible && !target.visible && properties.alpha != 0) {
+				
+				setVisible = true;
+				cacheVisible = target.visible;
+				target.visible = true;
+				
+			}
+			
+			timeOffset = startTime;
+			actuators.push (this);
+			++actuatorsLength;
+			
+		}
+		
+		
+		/**
+		 * @inheritDoc
+		 */
+		public override function onUpdate (handler:Function, ... parameters:Array):GenericActuator {
+			
+			MotionInternal::onUpdate = handler;
+			MotionInternal::onUpdateParams = parameters;
+			sendChange = true;
+			
+			return this;
+			
+		}
+		
+		
+		MotionInternal override function pause ():void {
+			
+			paused = true;
+			pauseTime = getTimer ();
+			
+		}
+		
+		
+		MotionInternal override function resume ():void {
+			
+			if (paused) {
+				
+				paused = false;
+				timeOffset += (getTimer () - pauseTime) / 1000;
+				
+			}
+			
+		}
+		
+		
+		MotionInternal override function stop (properties:Object, complete:Boolean, sendEvent:Boolean):void {
+			
+			if (active) {
+				
+				for (var propertyName:String in properties) {
+					
+					if (propertyName in this.properties) {
+						
+						active = false;
+						
+						if (complete) {
+							
+							apply ();
+							
+						}
+						
+						this.complete (sendEvent);
+						return;
+						
+					}
+					
+				}
+				
+				if (!properties) {
+					
+					active = false;
+					
+					if (complete) {
+						
+						apply ();
+						
+					}
+					
+					this.complete (sendEvent);
+					return;
+					
+				}
+				
+			}
+			
+		}
+		
+		
+		MotionInternal function update (currentTime:Number):void {
+			
+			if (!paused) {
+				
+				var details:PropertyDetails;
+				var easing:Number;
+				var i:uint;
+				
+				var tweenPosition:Number = (currentTime - timeOffset) / duration;
+				
+				if (tweenPosition > 1) {
+					
+					tweenPosition = 1;
+					
+				}
+				
+				if (!initialized) {
+					
+					initialize ();
+					
+				}
+				
+				if (!MotionInternal::special) {
+					
+					easing = MotionInternal::ease.calculate (tweenPosition);
+					
+					for (i = 0; i < detailsLength; ++i) {
+						
+						details = propertyDetails[i];
+						details.target[details.propertyName] = details.start + (details.change * easing);
+						
+					}
+					
+				} else {
+					
+					if (!MotionInternal::reverse) {
+						
+						easing = MotionInternal::ease.calculate (tweenPosition);
+						
+					} else {
+						
+						easing = MotionInternal::ease.calculate (1 - tweenPosition);
+						
+					}
+					
+					var endValue:Number;
+					
+					for (i = 0; i < detailsLength; ++i) {
+						
+						details = propertyDetails[i];
+						
+						if (MotionInternal::smartRotation && (details.propertyName == "rotation" || details.propertyName == "rotationX" || details.propertyName == "rotationY" || details.propertyName == "rotationZ")) {
+							
+							var rotation:Number = details.change % 360;
+							
+							if (rotation > 180) {
+								
+								rotation -= 360;
+								
+							} else if (rotation < -180) {
+								
+								rotation += 360;
+								
+							}
+							
+							endValue = details.start + rotation * easing;
+							
+						} else {
+							
+							endValue = details.start + (details.change * easing);
+							
+						}
+						
+						if (!MotionInternal::snapping) {
+							
+							details.target[details.propertyName] = endValue;
+							
+						} else {
+							
+							details.target[details.propertyName] = Math.round (endValue);
+							
+						}
+						
+					}
+					
+				}
+				
+				if (tweenPosition === 1) {
+					
+					if (MotionInternal::repeat === 0) {
+						
+						active = false;
+						
+						if (toggleVisible && target.alpha === 0) {
+							
+							target.visible = false;
+							
+						}
+						
+						complete (true);
+						return;
+						
+					} else {
+						
+						if (MotionInternal::reflect) {
+							
+							MotionInternal::reverse = !MotionInternal::reverse;
+							
+						}
+						
+						startTime = currentTime;
+						timeOffset = startTime + MotionInternal::delay;
+						
+						if (MotionInternal::repeat > 0) {
+							
+							MotionInternal::repeat --;
+							
+						}
+						
+					}
+					
+				}
+				
+				if (sendChange) {
+					
+					change ();
+					
+				}
+				
+			}
+			
+		}
+		
+		
+		
+		
+		// Event Handlers
+		
+		
+		
+		
+		protected static function shape_onEnterFrame (event:Event):void {
+			
+			var currentTime:Number = getTimer () / 1000;
+			
+			var actuator:SimpleActuator;
+			
+			for (var i:uint = 0; i < actuatorsLength; i++) {
+				
+				actuator = actuators[i];
+				
+				if (actuator.active) {
+					
+					if (currentTime > actuator.timeOffset) {
+						
+						actuator.MotionInternal::update (currentTime);
+						
+					}
+					
+				} else {
+					
+					actuators.splice (i, 1);
+					--actuatorsLength;
+					i --;
+					
+				}
+				
+			}
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/actuators/TransformActuator.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,187 @@
+package com.eclecticdesignstudio.motion.actuators {
+	
+	
+	import com.eclecticdesignstudio.motion.Actuate;
+	import flash.display.DisplayObject;
+	import flash.display.Sprite;
+	import flash.events.TimerEvent;
+	import flash.geom.ColorTransform;
+	import flash.media.SoundTransform;
+	import flash.utils.Timer;
+	
+	use namespace MotionInternal;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @version 1.2
+	 */
+	public class TransformActuator extends SimpleActuator {
+		
+		
+		protected var endColorTransform:ColorTransform;
+		protected var endSoundTransform:SoundTransform;
+		protected var tweenColorTransform:ColorTransform;
+		protected var tweenSoundTransform:SoundTransform;
+		
+		
+		public function TransformActuator (target:Object, duration:Number, properties:Object) {
+			
+			super (target, duration, properties);
+			
+		}
+		
+		
+		MotionInternal override function apply ():void {
+			
+			initialize ();
+			
+			if (endColorTransform) {
+				
+				target.transform.colorTransform = endColorTransform;
+				
+			}
+			
+			if (endSoundTransform) {
+				
+				target.soundTransform = endSoundTransform;
+				
+			}
+			
+		}
+		
+		
+		protected override function initialize ():void {
+			
+			if ("colorValue" in properties && target is DisplayObject) {
+				
+				initializeColor ();
+				
+			}
+			
+			if ("soundVolume" in properties || "soundPan" in properties) {
+				
+				initializeSound ();
+				
+			}
+			
+			detailsLength = propertyDetails.length;
+			initialized = true;
+			
+		}
+		
+		
+		protected function initializeColor ():void {
+			
+			endColorTransform = new ColorTransform ();
+			
+			var color:Number = properties.colorValue;
+			var strength:Number = properties.colorStrength;
+			
+			if (strength < 1) {
+				
+				var multiplier:Number;
+				var offset:Number;
+				
+				if (strength < 0.5) {
+					
+					multiplier = 1;
+					offset = (strength * 2);
+					
+				} else {
+					
+					multiplier = 1 - ((strength - 0.5) * 2);
+					offset = 1;
+					
+				}
+				
+				endColorTransform.redMultiplier = multiplier;
+				endColorTransform.greenMultiplier = multiplier;
+				endColorTransform.blueMultiplier = multiplier;
+				
+				endColorTransform.redOffset = offset * ((color >> 16) & 0xFF);
+				endColorTransform.greenOffset = offset * ((color >> 8) & 0xFF);
+				endColorTransform.blueOffset = offset * (color & 0xFF);
+				
+			} else {
+				
+				endColorTransform.color = color;
+				
+			}
+			
+			var propertyNames:Array = [ "redMultiplier", "greenMultiplier", "blueMultiplier", "redOffset", "greenOffset", "blueOffset" ];
+			
+			if ("colorAlpha" in properties) {
+				
+				endColorTransform.alphaMultiplier = properties.colorAlpha;
+				propertyNames.push ("alphaMultiplier");
+				
+			} else {
+				
+				endColorTransform.alphaMultiplier = target.alpha;
+				
+			}
+			
+			var begin:ColorTransform = target.transform.colorTransform;
+			tweenColorTransform = new ColorTransform ();
+			
+			var details:PropertyDetails;
+			var start:Number;
+			
+			for each (var propertyName:String in propertyNames) {
+				
+				start = Number (begin[propertyName]);
+				details = new PropertyDetails (tweenColorTransform, propertyName, start, Number (endColorTransform[propertyName] - start));
+				propertyDetails.push (details);
+				
+			}
+			
+		}
+		
+		
+		protected function initializeSound ():void {
+			
+			var start:SoundTransform = target.soundTransform;
+			endSoundTransform = target.soundTransform;
+			tweenSoundTransform = new SoundTransform ();
+			
+			if ("soundVolume" in properties) {
+				
+				endSoundTransform.volume = properties.soundVolume;
+				propertyDetails.push (new PropertyDetails (tweenSoundTransform, "volume", start.volume, endSoundTransform.volume - start.volume));
+				
+			}
+			
+			if ("soundPan" in properties) {
+				
+				endSoundTransform.pan = properties.soundPan;
+				propertyDetails.push (new PropertyDetails (tweenSoundTransform, "pan", start.pan, endSoundTransform.pan - start.pan));
+				
+			}
+			
+		}
+		
+		
+		MotionInternal override function update (currentTime:Number):void {
+			
+			super.MotionInternal::update (currentTime);
+			
+			if (endColorTransform) {
+				
+				target.transform.colorTransform = tweenColorTransform;
+				
+			}
+			
+			if (endSoundTransform) {
+				
+				target.soundTransform = tweenSoundTransform;
+				
+			}
+			
+		}
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Back.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,46 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.BackEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.BackEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.BackEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Zeh Fernando, Nate Chatellier
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Back {
+		
+		
+		static public function get easeIn ():IEasing { return new BackEaseIn (1.70158); }
+		static public function get easeOut ():IEasing { return new BackEaseOut (1.70158); }
+		static public function get easeInOut ():IEasing { return new BackEaseInOut (1.70158); }
+		
+		
+		static public function easeInWith (s:Number):IEasing {
+			
+			return new BackEaseIn (s);
+			
+		}
+		
+		
+		static public function easeOutWith (s:Number):IEasing {
+			
+			return new BackEaseOut (s);
+			
+		}
+		
+		
+		static public function easeInOutWith (s:Number):IEasing {
+			
+			return new BackEaseInOut (s);
+			
+		}
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Cubic.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,25 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.CubicEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.CubicEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.CubicEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Cubic {
+		
+		
+		static public function get easeIn ():IEasing { return new CubicEaseIn (); }
+		static public function get easeOut ():IEasing { return new CubicEaseOut (); }
+		static public function get easeInOut ():IEasing { return new CubicEaseInOut (); }
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Elastic.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,57 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.ElasticEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.ElasticEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.ElasticEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Elastic {
+		
+		
+		static public function get easeIn ():IEasing { return new ElasticEaseIn (0.1, 0.4); }
+		static public function get easeOut ():IEasing { return new ElasticEaseOut (0.1, 0.4); }
+		static public function get easeInOut ():IEasing { return new ElasticEaseInOut (0.1, 0.4); }
+		
+		
+		static public function easeInWith (a:Number, p:Number):IEasing {
+			
+			return new ElasticEaseIn (a, p);
+			
+		}
+		
+		
+		static public function easeOutWith (a:Number, p:Number):IEasing {
+			
+			return new ElasticEaseOut (a, p);
+			
+		}
+		
+		
+		static public function easeInOutWith (a:Number, p:Number):IEasing {
+			
+			return new ElasticEaseInOut (a, p);
+			
+		}
+		
+		
+	}
+	
+
+}
+
+
+import com.eclecticdesignstudio.motion.easing.IEasing;
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Expo.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,24 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.ExpoEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.ExpoEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.ExpoEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Expo {
+		
+		
+		static public function get easeIn ():IEasing { return new ExpoEaseIn (); }
+		static public function get easeOut ():IEasing { return new ExpoEaseOut (); }
+		static public function get easeInOut ():IEasing { return new ExpoEaseInOut (); }
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/IEasing.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,18 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 */
+	public interface IEasing {
+		
+		
+		function calculate (k:Number):Number;
+		function ease (t:Number, b:Number, c:Number, d:Number):Number;
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Linear.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,21 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.LinearEaseNone;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Linear {
+		
+		
+		static public function get easeNone ():IEasing { return new LinearEaseNone (); }
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Quad.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,25 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.QuadEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.QuadEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.QuadEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Quad {
+		
+		
+		static public function get easeIn ():IEasing { return new QuadEaseIn (); }
+		static public function get easeOut ():IEasing { return new QuadEaseOut (); }
+		static public function get easeInOut ():IEasing { return new QuadEaseInOut (); }
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Quart.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,25 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.QuartEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.QuartEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.QuartEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Quart {
+		
+		
+		static public function get easeIn ():IEasing { return new QuartEaseIn (); }
+		static public function get easeOut ():IEasing { return new QuartEaseOut (); }
+		static public function get easeInOut ():IEasing { return new QuartEaseInOut (); }
+		
+		
+	}
+	
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Quint.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,24 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.QuintEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.QuintEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.QuintEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Philippe / http://philippe.elsass.me
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Quint {
+		
+		
+		static public function get easeIn ():IEasing { return new QuintEaseIn (); }
+		static public function get easeOut ():IEasing { return new QuintEaseOut (); }
+		static public function get easeInOut ():IEasing { return new QuintEaseInOut (); }
+		
+		
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/Sine.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,24 @@
+package com.eclecticdesignstudio.motion.easing {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.equations.SineEaseIn;
+	import com.eclecticdesignstudio.motion.easing.equations.SineEaseInOut;
+	import com.eclecticdesignstudio.motion.easing.equations.SineEaseOut;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
+	 */
+	final public class Sine {
+		
+		
+		static public function get easeIn ():IEasing { return new SineEaseIn (); }
+		static public function get easeOut ():IEasing { return new SineEaseOut (); }
+		static public function get easeInOut ():IEasing { return new SineEaseInOut (); }
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/BackEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,40 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class BackEaseIn implements IEasing {
+		
+		
+		public var s:Number;
+		
+		
+		public function BackEaseIn (s:Number) {
+			
+			this.s = s;
+			
+		}
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k * k * ((s + 1) * k - s);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c*(t/=d)*t*((s+1)*t - s) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/BackEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,42 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class BackEaseInOut implements IEasing {
+		
+		
+		public var s:Number;
+		
+		
+		public function BackEaseInOut (s:Number) {
+			
+			this.s = s;
+			
+		}
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if ((k /= 0.5) < 1) return 0.5 * (k * k * (((s *= (1.525)) + 1) * k - s));
+			return 0.5 * ((k -= 2) * k * (((s *= (1.525)) + 1) * k + s) + 2);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+			return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/BackEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,40 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class BackEaseOut implements IEasing {
+		
+		
+		public var s:Number;
+		
+		
+		public function BackEaseOut (s:Number) {
+			
+			this.s = s;
+			
+		}
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return ((k = k - 1) * k * ((s + 1) * k + s) + 1);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/CubicEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class CubicEaseIn implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k * k * k;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * (t /= d) * t * t + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/CubicEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class CubicEaseInOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return ((k /= 1 / 2) < 1) ? 0.5 * k * k * k : 0.5 * ((k -= 2) * k * k + 2);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return ((t /= d / 2) < 1) ? c / 2 * t * t * t + b : c / 2 * ((t -= 2) * t * t + 2) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/CubicEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class CubicEaseOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return --k * k * k + 1;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * ((t = t / d - 1) * t * t + 1) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ElasticEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,63 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class ElasticEaseIn implements IEasing {
+		
+		
+		public var a:Number;
+		public var p:Number;
+		
+		
+		public function ElasticEaseIn (a:Number, p:Number) {
+			
+			this.a = a;
+			this.p = p;
+			
+		}
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if (k == 0) return 0; if (k == 1) return 1; if (!p) p = 0.3;
+			var s:Number;
+			if (!a || a < 1) { a = 1; s = p / 4; }
+			else s = p / (2 * Math.PI) * Math.asin (1 / a);
+			return -(a * Math.pow(2, 10 * (k -= 1)) * Math.sin( (k - s) * (2 * Math.PI) / p ));
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if (t == 0) {
+				return b;
+			}
+			if ((t /= d) == 1) {
+				return b + c;
+			}
+			if (!p) {
+				p = d * 0.3;
+			}
+			var s:Number;
+			if (!a || a < Math.abs(c)) {
+				a = c;
+				s = p / 4;
+			}
+			else {
+				s = p / (2 * Math.PI) * Math.asin(c / a);
+			}
+			return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ElasticEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,75 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class ElasticEaseInOut implements IEasing {
+		
+		
+		public var a:Number;
+		public var p:Number;
+		
+		
+		public function ElasticEaseInOut (a:Number, p:Number) {
+			
+			this.a = a;
+			this.p = p;
+			
+		}
+		
+		public function calculate (k:Number):Number {
+			
+			if (k == 0) {
+				return 0;
+			}
+			if ((k /= 1 / 2) == 2) {
+				return 1;
+			}
+			
+			var p:Number = (0.3 * 1.5);
+			var a:Number = 1;
+			var s:Number = p / 4;
+			
+			if (k < 1) {
+				return -0.5 * (Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p));
+			}
+			return Math.pow(2, -10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if (t == 0) {
+				return b;
+			}
+			if ((t /= d / 2) == 2) {
+				return b + c;
+			}
+			if (!p) {
+				p = d * (0.3 * 1.5);
+			}
+			var s:Number;
+			if (!a || a < Math.abs(c)) {
+				a = c;
+				s = p / 4;
+			}
+			else {
+				s = p / (2 * Math.PI) * Math.asin(c / a);
+			}
+			if (t < 1) {
+				return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
+			}
+			return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ElasticEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,63 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class ElasticEaseOut implements IEasing {
+		
+		
+		public var a:Number;
+		public var p:Number;
+		
+		
+		public function ElasticEaseOut (a:Number, p:Number) {
+			
+			this.a = a;
+			this.p = p;
+			
+		}
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if (k == 0) return 0; if (k == 1) return 1; if (!p) p = 0.3;
+			var s:Number;
+			if (!a || a < 1) { a = 1; s = p / 4; }
+			else s = p / (2 * Math.PI) * Math.asin (1 / a);
+			return (a * Math.pow(2, -10 * k) * Math.sin((k - s) * (2 * Math.PI) / p ) + 1);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if (t == 0) {
+				return b;
+			}
+			if ((t /= d) == 1) {
+				return b + c;
+			}
+			if (!p) {
+				p = d * 0.3;
+			}
+			var s:Number;
+			if (!a || a < Math.abs(c)) {
+				a = c;
+				s = p / 4;
+			}
+			else {
+				s = p / (2 * Math.PI) * Math.asin(c / a);
+			}
+			return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ExpoEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class ExpoEaseIn implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k == 0 ? 0 : Math.pow(2, 10 * (k - 1));
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ExpoEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,44 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class ExpoEaseInOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if (k == 0) { return 0; }
+			if (k == 1) { return 1; }
+			if ((k /= 1 / 2.0) < 1.0) {
+				return 0.5 * Math.pow(2, 10 * (k - 1));
+			}
+			return 0.5 * (2 - Math.pow(2, -10 * --k));
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if (t == 0) {
+				return b;
+			}
+			if (t == d) {
+				return b + c;
+			}
+			if ((t /= d / 2.0) < 1.0) {
+				return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
+			}
+			return c / 2 * (2 - Math.pow(2, -10 * --t)) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/ExpoEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class ExpoEaseOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k == 1 ? 1 : (1 - Math.pow(2, -10 * k));
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return t == d ? b + c : c * (1 - Math.pow(2, -10 * t / d)) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/LinearEaseNone.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class LinearEaseNone implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * t / d + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuadEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuadEaseIn implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k * k;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * (t /= d) * t + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuadEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,36 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuadEaseInOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if ((k *= 2) < 1) {
+				return 1 / 2 * k * k;
+			}
+			return -1 / 2 * ((--k) * (k - 2) - 1);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if ((t /= d / 2) < 1) {
+				return c / 2 * t * t + b;
+			}
+			return -c / 2 * ((--t) * (t - 2) - 1) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuadEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuadEaseOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return -k * (k - 2);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return -c * (t /= d) * (t - 2) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuartEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuartEaseIn implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k * k * k * k;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * (t /= d) * t * t * t + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuartEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,34 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuartEaseInOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if ((k *= 2) < 1) return 0.5 * k * k * k * k;
+			return -0.5 * ((k -= 2) * k * k * k - 2);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if ((t /= d / 2) < 1) {
+				return c / 2 * t * t * t * t + b;
+			}
+			return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuartEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuartEaseOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return -(--k * k * k * k - 1);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return -c * ((t = t / d - 1) * t * t * t - 1) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuintEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuintEaseIn implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return k * k * k * k * k;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * (t /= d) * t * t * t * t + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuintEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,34 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuintEaseInOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			if ((k *= 2) < 1) return 0.5 * k * k * k * k * k;
+			return 0.5 * ((k -= 2) * k * k * k * k + 2);
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			if ((t /= d / 2) < 1) {
+				return c / 2 * t * t * t * t * t + b;
+			}
+			return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/QuintEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class QuintEaseOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return --k * k * k * k * k + 1;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/SineEaseIn.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class SineEaseIn implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return 1 - Math.cos(k * (Math.PI / 2));
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/SineEaseInOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class SineEaseInOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return - (Math.cos(Math.PI * k) - 1) / 2;
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/com/eclecticdesignstudio/motion/easing/equations/SineEaseOut.as	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,30 @@
+package com.eclecticdesignstudio.motion.easing.equations {
+	
+	
+	import com.eclecticdesignstudio.motion.easing.IEasing;
+	
+	
+	/**
+	 * @author Joshua Granick
+	 */
+	final public class SineEaseOut implements IEasing {
+		
+		
+		public function calculate (k:Number):Number {
+			
+			return Math.sin(k * (Math.PI / 2));
+			
+		}
+		
+		
+		public function ease (t:Number, b:Number, c:Number, d:Number):Number {
+			
+			return c * Math.sin(t / d * (Math.PI / 2)) + b;
+			
+		}
+		
+		
+	}
+	
+	
+}
\ No newline at end of file
--- a/script/record_mic/record_mic.as	Wed Jun 06 15:53:30 2012 +0200
+++ b/script/record_mic/record_mic.as	Wed Jun 06 18:31:09 2012 +0200
@@ -1,1 +1,1 @@
-package  {
	
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	
	import flash.events.MouseEvent;
	import flash.events.NetStatusEvent;
	import flash.events.IOErrorEvent;
	import flash.events.SecurityErrorEvent;
	import flash.events.AsyncErrorEvent;
	import flash.events.ErrorEvent;
	import flash.events.ActivityEvent;
	import flash.events.Event;
	
	import flash.media.Microphone;
	
	import flash.net.NetConnection;
	import flash.net.NetStream;
	
	import flash.system.Security;
	
	import flash.text.TextField;
	
	import fl.controls.ProgressBar;
	import fl.controls.ProgressBarMode;
	import fl.controls.Slider;
	import fl.events.SliderEvent;
	import flash.utils.setInterval;
	import flash.external.ExternalInterface;
	
	public class record_mic extends MovieClip {
		
		private var t:TextField;
		private var r:SimpleButton;
		private var p:Sprite;
		private var playVisible:Boolean = false;
		
		private var urlServer:String = "rtmp://media.iri.centrepompidou.fr/ddc_micro_record";
		private var nc:NetConnection;
		private var ns:NetStream;
		private var ns2:NetStream;
		private var mic:Microphone;
		private var filename:String;
		private var recordRunning:Boolean = false;
		private var recordStopped:Boolean = false;
		
		// Draw mic feedback
		private var pb:ProgressBar;
		private var activityCurve:Sprite;
		private var micGain:Slider;
		// Variables for the activity curve
		private var xInc:int = 0;
		private var xSpeed:int = 2;
		private var activityWidth:Number;
		// Intervals used to draw the curve et keep track of the duration of the recording
		private var drawCurve:Number;
		private var timecodeInterval:Number;
		private var timecode:Number = 0;
		
		
		public function record_mic() {
			// constructor code
			Security.allowDomain("*");
			Security.allowInsecureDomain("*");
			
			//t = _t;
			r = _recordBtn;
			p = _playBtn;
			pb = _pb;
			activityWidth = _act.width;
			activityCurve = _act._activityCurve;
			micGain = _micGain;
			trace("t = " + t + ", r = " + r + ", p = " + p + ", pb = " + pb);
			
			// Fuck CS5 "new feature from built-in preloader" : loaderInfo.parameters is from parent.parent.loaderInfo.parameter
			var flashVars:Object = new Object();
			if(parent!=null){
				if (parent.parent!=null) flashVars = parent.parent.loaderInfo.parameters;
				else flashVars = parent.loaderInfo.parameters;
			}
			else flashVars = loaderInfo.parameters;
			for(var param:Object in flashVars){
				trace("    flashVars " + param + " : " + flashVars[param.toString()]);
			}
			if(flashVars["playVisible"]=="true"){
				playVisible = true;
			}
			
			micGain.visible = p.visible = pb.visible = _act.visible = false;
			//r.buttonMode = r.useHandCursor = 
			p.buttonMode = p.useHandCursor = true;
			pb.mode = ProgressBarMode.MANUAL;
			r.addEventListener(MouseEvent.CLICK, startRecord);
			p.addEventListener(MouseEvent.CLICK, playRecord);
			
			try{
				ExternalInterface.addCallback("stopRecord", stopRecord);
			}
			catch(e:*){
				//t.text = "ExternalInterface error catch e = " + e;
			}
		}
		private function startRecord(e:MouseEvent=null):void{
			trace("startRecord nc = " + nc + ", recordRunning = " + recordRunning);
			if(!recordRunning){
				if (nc==null){
					trace("  startRecord 2");
					nc = new NetConnection();
					nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler, false, 0, true);
					nc.addEventListener(IOErrorEvent.IO_ERROR, errorHandler, false, 0, true);
					nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler, false, 0, true);
					nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler, false, 0, true);    	
					nc.connect(urlServer);
				}
				else{
					publish();
				}
			}
			else{
				// If record is running, we stop it
				stopRecord();
			}
		}
		private function errorHandler(e:*=null):void {
			trace("errorHandler");
        	closeStream();
        }
		private function closeStream():void{
			trace("closeStream");
			if(ns!=null){
				trace("  ns.close()");
        		ns.close();
        		ns = null;
			}
		}
		private function netStatusHandler(event:NetStatusEvent):void {
			trace("netStatusHandler : " + event.info.code);
        	switch (event.info.code) {
	        	case 'NetConnection.Connect.Success':
					publish();
	        		break;
	        	case 'NetConnection.Connect.Failed':
	        	case 'NetConnection.Connect.Reject':
	        	case 'NetConnection.Connect.Closed':
	        		//closeStream();
	        		break;
        	}
        }
		// send data over rtmp
		private function publish():void {
			trace("publish (ns==null && nc!=null && nc.connected) = " + (ns==null && nc!=null && nc.connected));
			if(nc!=null && nc.connected) {
				trace("  publish 2");
				ns = new NetStream(nc);
				ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler, false, 0, true);
				ns.addEventListener(IOErrorEvent.IO_ERROR, errorHandler, false, 0, true);
				ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler, false, 0, true);
				// informs the server to record what it receives
				// in fact file name is passed as the user name (the server is meant to record everything it has to in a file named from the user name)	
				filename = "r_" + now();
				trace("filename = " + filename);
				recordRunning = true;
				ns.publish(filename, 'record');
				mic = Microphone.getMicrophone(-1);
				mic.rate = 22;
				micGain.minimum = 0;
				micGain.maximum = 100;
				micGain.value = mic.gain = 50;
				micGain.addEventListener(SliderEvent.CHANGE, onSliderChange);
				mic.addEventListener(ActivityEvent.ACTIVITY, runMicActivity);
				mic.setUseEchoSuppression(true);
				ns.attachAudio(mic);
				micGain.visible = pb.visible = _act.visible = true;
				p.visible = playVisible;
				// ExternalInterface call to give audio url
				ExternalInterface.call("setAudioUrl", urlServer + "/" + filename);
			}
		}
		// stop the recording of audio to the stream
		private function stopRecord(e:*=null):void{
			trace("stopRecord (ns!=null) = " + (ns!=null));
			if(ns!=null){
				trace("  stopRecord 2");
				recordRunning = false;
				recordStopped = true;
				ns.play(false); // flushes the recording buffer
    			ns.close();
			}
		}
		// plays back the audio that was recorded
		private function playRecord(e:*=null):void{
			trace("playRecord (ns!=null && recordStopped) = " + (ns!=null && recordStopped));
			if(recordStopped){
				trace("  playRecord 2");
				ns2 = new NetStream(nc);
				ns2.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler2, false, 0, true);
				ns2.addEventListener(IOErrorEvent.IO_ERROR, errorHandler2, false, 0, true);
				ns2.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler2, false, 0, true);
				ns2.play(filename);
			}
		}
		private function netStatusHandler2(event:NetStatusEvent):void {
			trace("netStatusHandler 2 : " + event.info.code);
        }
		private function errorHandler2(e:*=null):void {
			trace("errorHandler 2");
        	closeStream2();
        }
		private function closeStream2():void{
			trace("closeStream 2");
			/*if(ns2!=null){
				trace("  ns.close()");
        		ns2.close();
        		ns2 = null;
			}*/
		}
		// Now in string
		private function now():String{
			var d:Date = new Date();
			var m:uint = d.month + 1; // because Date.month begins at 0
			return d.fullYear + (m<10?("0"+m):m) + (d.date<10?("0"+d.date):d.date) + (d.hours<10?("0"+d.hours):d.hours) + (d.minutes<10?("0"+d.minutes):d.minutes) + (d.seconds<10?("0"+d.seconds):d.seconds) + (d.milliseconds<100?"0":"") + (d.milliseconds<10?"0":"") + d.milliseconds;
		}
		
		// sets the module ready to record mic activity changes
		private function runMicActivity(e:ActivityEvent):void {
			trace("runMicActivity");
			mic.removeEventListener(ActivityEvent.ACTIVITY, runMicActivity);
			addEventListener(Event.ENTER_FRAME, showMicActivity);
			// Start activity curve feedback, every second
			activityCurve.graphics.clear();
			activityCurve.graphics.lineStyle(1, 0xc4c4c4, 1);
			activityCurve.graphics.moveTo(0, 20);
			activityCurve.graphics.beginFill(0xc4c4c4, 100);
			xInc = 0;
			activityCurve.x = 1;
			setInterval(drawSoundCurve, 100);
		}
		// updates the progress bar relating to mic activity
		private function showMicActivity(e:Event):void {
			//trace("showMicActivity res = " + mic.activityLevel);
			pb.setProgress(mic.activityLevel,100);
		}
		// updates the actiity curve relating to mic activity
		private function drawSoundCurve():void {
			if(recordRunning){
				trace("drawSoundCurve recordRunning = " + recordRunning + ", mic.activityLevel =  " + mic.activityLevel + ", mic.gain = " + mic.gain + ", h = " + (19*mic.activityLevel/100));
				activityCurve.graphics.lineTo(xInc, 19 - (19*mic.activityLevel/100));	
				activityCurve.graphics.lineTo(xInc, 19);
				if(xInc>activityWidth){
					activityCurve.x -= xSpeed;
				}
				xInc += xSpeed;
			}
		}
		// Updates mic gain
		private function onSliderChange(e:SliderEvent):void {
			trace("onSliderChange");
			mic.gain = micGain.value;
		}
		
	}
	
}
\ No newline at end of file
+package  {
	
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	
	import flash.events.MouseEvent;
	import flash.events.NetStatusEvent;
	import flash.events.IOErrorEvent;
	import flash.events.SecurityErrorEvent;
	import flash.events.AsyncErrorEvent;
	import flash.events.ErrorEvent;
	import flash.events.ActivityEvent;
	import flash.events.Event;
	
	import flash.media.Microphone;
	
	import flash.net.NetConnection;
	import flash.net.NetStream;
	
	import flash.system.Security;
	import flash.system.SecurityPanel;
	
	import flash.text.TextField;
	
	import flash.utils.setInterval;
	
	import fl.controls.ProgressBar;
	import fl.controls.ProgressBarMode;
	import fl.controls.Slider;
	import fl.events.SliderEvent;
	import flash.external.ExternalInterface;
	import com.eclecticdesignstudio.motion.Actuate;
	
	public class record_mic extends MovieClip {
		
		private var t:TextField;
		private var r:SimpleButton;
		private var p:Sprite;
		private var playVisible:Boolean = false;
		
		private var urlServer:String = "rtmp://media.iri.centrepompidou.fr/ddc_micro_record";
		private var nc:NetConnection;
		private var ns:NetStream;
		private var ns2:NetStream;
		private var mic:Microphone;
		private var filename:String;
		private var recordRunning:Boolean = false;
		private var recordStopped:Boolean = false;
		
		// Draw mic feedback
		private var pb:ProgressBar;
		private var activityCurve:Sprite;
		private var micGain:Slider;
		// Variables for the activity curve
		private var xInc:int = 0;
		private var xSpeed:int = 2;
		private var activityWidth:Number;
		// Intervals used to draw the curve et keep track of the duration of the recording
		private var drawCurve:Number;
		private var timecodeInterval:Number;
		private var timecode:Number = 0;
		
		
		public function record_mic() {
			// constructor code
			Security.allowDomain("*");
			Security.allowInsecureDomain("*");
			Security.showSettings(SecurityPanel.DEFAULT);
			
			//t = _t;
			r = _recordBtn;
			p = _playBtn;
			pb = _pb;
			activityWidth = _act.width;
			activityCurve = _act._activityCurve;
			micGain = _micGain;
			trace("t = " + t + ", r = " + r + ", p = " + p + ", pb = " + pb);
			
			// Fuck CS5 "new feature from built-in preloader" : loaderInfo.parameters is from parent.parent.loaderInfo.parameter
			var flashVars:Object = new Object();
			if(parent!=null){
				if (parent.parent!=null) flashVars = parent.parent.loaderInfo.parameters;
				else flashVars = parent.loaderInfo.parameters;
			}
			else flashVars = loaderInfo.parameters;
			for(var param:Object in flashVars){
				trace("    flashVars " + param + " : " + flashVars[param.toString()]);
			}
			if(flashVars["playVisible"]=="true"){
				playVisible = true;
			}
			
			micGain.visible = p.visible = pb.visible = _act.visible = false;
			//r.buttonMode = r.useHandCursor = 
			p.buttonMode = p.useHandCursor = true;
			pb.mode = ProgressBarMode.MANUAL;
			r.addEventListener(MouseEvent.CLICK, startRecord);
			p.addEventListener(MouseEvent.CLICK, playRecord);
			
			try{
				ExternalInterface.addCallback("stopRecord", stopRecord);
			}
			catch(e:*){
				//t.text = "ExternalInterface error catch e = " + e;
			}
		}
		private function startRecord(e:MouseEvent=null):void{
			trace("startRecord nc = " + nc + ", recordRunning = " + recordRunning);
			if(!recordRunning){
				if (nc==null){
					trace("  startRecord 2");
					nc = new NetConnection();
					nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler, false, 0, true);
					nc.addEventListener(IOErrorEvent.IO_ERROR, errorHandler, false, 0, true);
					nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler, false, 0, true);
					nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler, false, 0, true);    	
					nc.connect(urlServer);
				}
				else{
					publish();
				}
			}
			else{
				// If record is running, we stop it
				stopRecord();
			}
		}
		private function errorHandler(e:*=null):void {
			trace("errorHandler");
        	closeStream();
        }
		private function closeStream():void{
			trace("closeStream");
			if(ns!=null){
				trace("  ns.close()");
        		ns.close();
        		ns = null;
			}
		}
		private function netStatusHandler(event:NetStatusEvent):void {
			trace("netStatusHandler : " + event.info.code);
        	switch (event.info.code) {
	        	case 'NetConnection.Connect.Success':
					publish();
	        		break;
	        	case 'NetConnection.Connect.Failed':
	        	case 'NetConnection.Connect.Reject':
	        	case 'NetConnection.Connect.Closed':
	        		//closeStream();
	        		break;
        	}
        }
		// send data over rtmp
		private function publish():void {
			trace("publish (ns==null && nc!=null && nc.connected) = " + (ns==null && nc!=null && nc.connected));
			if(nc!=null && nc.connected) {
				trace("  publish 2");
				ns = new NetStream(nc);
				ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler, false, 0, true);
				ns.addEventListener(IOErrorEvent.IO_ERROR, errorHandler, false, 0, true);
				ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler, false, 0, true);
				// informs the server to record what it receives
				// in fact file name is passed as the user name (the server is meant to record everything it has to in a file named from the user name)	
				filename = "r_" + now();
				trace("filename = " + filename);
				recordRunning = true;
				ns.publish(filename, 'record');
				mic = Microphone.getMicrophone(-1);
				mic.rate = 22;
				micGain.minimum = 0;
				micGain.maximum = 100;
				micGain.value = mic.gain = 50;
				micGain.addEventListener(SliderEvent.CHANGE, onSliderChange);
				mic.addEventListener(ActivityEvent.ACTIVITY, runMicActivity);
				mic.setUseEchoSuppression(true);
				ns.attachAudio(mic);
				micGain.visible = pb.visible = _act.visible = true;
				p.visible = playVisible;
				// ExternalInterface call to give audio url
				ExternalInterface.call("setAudioUrl", urlServer + "/" + filename);
				// We tween the red button
				tween1to0();
			}
		}
		// stop the recording of audio to the stream
		private function stopRecord(e:*=null):void{
			trace("stopRecord (ns!=null) = " + (ns!=null));
			if(ns!=null){
				trace("  stopRecord 2");
				recordRunning = false;
				recordStopped = true;
				ns.play(false); // flushes the recording buffer
    			ns.close();
			}
			stopTween();
		}
		// plays back the audio that was recorded
		private function playRecord(e:*=null):void{
			trace("playRecord (ns!=null && recordStopped) = " + (ns!=null && recordStopped));
			if(recordStopped){
				trace("  playRecord 2");
				ns2 = new NetStream(nc);
				ns2.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler2, false, 0, true);
				ns2.addEventListener(IOErrorEvent.IO_ERROR, errorHandler2, false, 0, true);
				ns2.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler2, false, 0, true);
				ns2.play(filename);
			}
		}
		private function netStatusHandler2(event:NetStatusEvent):void {
			trace("netStatusHandler 2 : " + event.info.code);
        }
		private function errorHandler2(e:*=null):void {
			trace("errorHandler 2");
        	closeStream2();
        }
		private function closeStream2():void{
			trace("closeStream 2");
			/*if(ns2!=null){
				trace("  ns.close()");
        		ns2.close();
        		ns2 = null;
			}*/
		}
		// Now in string
		private function now():String{
			var d:Date = new Date();
			var m:uint = d.month + 1; // because Date.month begins at 0
			return d.fullYear + (m<10?("0"+m):m) + (d.date<10?("0"+d.date):d.date) + (d.hours<10?("0"+d.hours):d.hours) + (d.minutes<10?("0"+d.minutes):d.minutes) + (d.seconds<10?("0"+d.seconds):d.seconds) + (d.milliseconds<100?"0":"") + (d.milliseconds<10?"0":"") + d.milliseconds;
		}
		
		// sets the module ready to record mic activity changes
		private function runMicActivity(e:ActivityEvent):void {
			trace("runMicActivity");
			mic.removeEventListener(ActivityEvent.ACTIVITY, runMicActivity);
			addEventListener(Event.ENTER_FRAME, showMicActivity);
			// Start activity curve feedback, every second
			activityCurve.graphics.clear();
			activityCurve.graphics.lineStyle(1, 0xc4c4c4, 1);
			activityCurve.graphics.moveTo(0, 20);
			activityCurve.graphics.beginFill(0xc4c4c4, 100);
			xInc = 0;
			activityCurve.x = 1;
			setInterval(drawSoundCurve, 100);
		}
		// updates the progress bar relating to mic activity
		private function showMicActivity(e:Event):void {
			//trace("showMicActivity res = " + mic.activityLevel);
			pb.setProgress(mic.activityLevel,100);
		}
		// updates the actiity curve relating to mic activity
		private function drawSoundCurve():void {
			if(recordRunning){
				//trace("drawSoundCurve recordRunning = " + recordRunning + ", mic.activityLevel =  " + mic.activityLevel + ", mic.gain = " + mic.gain + ", h = " + (19*mic.activityLevel/100));
				activityCurve.graphics.lineTo(xInc, 19 - (19*mic.activityLevel/100));	
				activityCurve.graphics.lineTo(xInc, 19);
				if(xInc>activityWidth){
					activityCurve.x -= xSpeed;
				}
				xInc += xSpeed;
			}
		}
		// Updates mic gain
		private function onSliderChange(e:SliderEvent):void {
			trace("onSliderChange");
			mic.gain = micGain.value;
		}
		
		// Tween management
		private function tween0to1():void {
			Actuate.tween(r, .5, { alpha: 1 } ).onComplete(tween1to0);
		}
		private function tween1to0():void {
			Actuate.tween(r, .5, { alpha: .2 } ).onComplete(tween0to1);
		}
		private function stopTween():void {
			trace("stopTween");
			Actuate.reset();
			r.alpha = 1;
		}
		
	}
	
}
\ No newline at end of file
Binary file script/record_mic/record_mic.swf has changed
--- a/script/record_mic/record_mic/DOMDocument.xml	Wed Jun 06 15:53:30 2012 +0200
+++ b/script/record_mic/record_mic/DOMDocument.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -1,10 +1,11 @@
-<DOMDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" width="220" height="140" frameRate="12" currentTimeline="1" xflVersion="2.0" creatorInfo="Adobe Flash Professional CS5" platform="Macintosh" versionInfo="Saved by Adobe Flash Macintosh 11.0 build 489" majorVersion="11" buildNumber="489" rulerVisible="true" viewAngle3D="23.524879919254" nextSceneIdentifier="2" playOptionsPlayLoop="false" playOptionsPlayPages="false" playOptionsPlayFrameActions="false">
+<DOMDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" width="220" height="160" frameRate="12" currentTimeline="1" xflVersion="2.0" creatorInfo="Adobe Flash Professional CS5" platform="Macintosh" versionInfo="Saved by Adobe Flash Macintosh 11.0 build 489" majorVersion="11" buildNumber="489" rulerVisible="true" viewAngle3D="23.524879919254" nextSceneIdentifier="2" playOptionsPlayLoop="false" playOptionsPlayPages="false" playOptionsPlayFrameActions="false">
      <folders>
           <DOMFolderItem name="Component Assets" itemID="44e488a0-000016d6"/>
           <DOMFolderItem name="Component Assets/_private" itemID="4573a4bc-000003c6"/>
           <DOMFolderItem name="Component Assets/ProgressBarSkins" itemID="44c91c22-00000249"/>
           <DOMFolderItem name="Component Assets/Shared" itemID="44f892ff-0000001e"/>
           <DOMFolderItem name="Component Assets/SliderSkins" itemID="44c91c94-00000267"/>
+          <DOMFolderItem name="mic" itemID="4fcf77dd-000002b5"/>
      </folders>
      <fonts>
           <DOMFontItem name="ArialRegular" itemID="4fc8c261-0000029e" font="ArialMT" size="0" id="1" sourceLastImported="1338557025" embedRanges="9999"/>
@@ -98,8 +99,6 @@
                </customIcon>
                <SwcItem name="fl.core.ComponentShim" version="1267043003" isTopLevel="true"/>
           </DOMCompiledClipItem>
-          <DOMBitmapItem name="record.png" itemID="4fcc8c08-000002a2" sourceExternalFilepath="./LIBRARY/record.png" sourceLastImported="1338804437" sourcePlatform="macintosh" externalFileSize="7399" originalCompressionType="lossless" quality="50" href="record.png" bitmapDataHRef="M 11 1338805256.dat" frameRight="1900" frameBottom="1900"/>
-          <DOMBitmapItem name="record2.png" itemID="4fcc8c08-000002a7" sourceExternalFilepath="./LIBRARY/record2.png" sourceLastImported="1338804430" sourcePlatform="macintosh" externalFileSize="7554" originalCompressionType="lossless" quality="50" href="record2.png" bitmapDataHRef="M 12 1338805256.dat" frameRight="1900" frameBottom="1900"/>
      </media>
      <symbols>
           <Include href="ActivityProgress.xml" loadImmediate="false"/>
@@ -116,6 +115,9 @@
           <Include href="Component Assets/SliderSkins/SliderTrack_disabledSkin.xml"/>
           <Include href="Component Assets/SliderSkins/SliderTrack_skin.xml"/>
           <Include href="EmptyMC.xml" loadImmediate="false"/>
+          <Include href="mic/Bouton Microphone.xml" itemIcon="0" loadImmediate="false"/>
+          <Include href="mic/fond.xml" itemIcon="0" loadImmediate="false"/>
+          <Include href="mic/micro.xml" itemIcon="0" loadImmediate="false"/>
           <Include href="PlayBtn.xml" loadImmediate="false"/>
           <Include href="ProgressBar.xml"/>
           <Include href="RecordBtn.xml" itemIcon="0" loadImmediate="false"/>
@@ -124,21 +126,21 @@
      <timelines>
           <DOMTimeline name="Séquence 1" guides='&lt;guidelines&gt;&lt;guideline direction="v"&gt;110&lt;/guideline&gt;&lt;/guidelines&gt;'>
                <layers>
-                    <DOMLayer name="activity" color="#FF800A" current="true" isSelected="true" autoNamed="false">
+                    <DOMLayer name="activity" color="#FF800A" autoNamed="false">
                          <frames>
                               <DOMFrame index="0" keyMode="9728">
                                    <elements>
-                                        <DOMSymbolInstance libraryItemName="ActivityProgress" name="_act" centerPoint3DX="108" centerPoint3DY="22.5">
+                                        <DOMSymbolInstance libraryItemName="ActivityProgress" name="_act" centerPoint3DX="105" centerPoint3DY="17.5">
                                              <matrix>
-                                                  <Matrix tx="77" ty="13"/>
+                                                  <Matrix tx="74" ty="8"/>
                                              </matrix>
                                              <transformationPoint>
                                                   <Point x="31" y="9.5"/>
                                              </transformationPoint>
                                         </DOMSymbolInstance>
-                                        <DOMComponentInstance libraryItemName="ProgressBar" name="_pb" centerPoint3DX="155.55" centerPoint3DY="23.45" uniqueID="4">
+                                        <DOMComponentInstance libraryItemName="ProgressBar" name="_pb" centerPoint3DX="152.55" centerPoint3DY="18.45" uniqueID="4">
                                              <matrix>
-                                                  <Matrix a="0" b="-0.139999389648438" c="1.49998474121094" d="0" tx="152.1" ty="34.1"/>
+                                                  <Matrix a="0" b="-0.139999389648438" c="1.49998474121094" d="0" tx="149.1" ty="29.1"/>
                                              </matrix>
                                              <transformationPoint>
                                                   <Point x="75" y="2"/>
@@ -163,9 +165,9 @@
    </property>
 ]]></parametersAsXML>
                                         </DOMComponentInstance>
-                                        <DOMComponentInstance libraryItemName="Slider" name="_micGain" selected="true" centerPoint3DX="74.5" centerPoint3DY="22" uniqueID="2">
+                                        <DOMComponentInstance libraryItemName="Slider" name="_micGain" centerPoint3DX="71.5" centerPoint3DY="17" uniqueID="2">
                                              <matrix>
-                                                  <Matrix a="0" b="0.3125" c="1" d="0" tx="73" ty="9.5"/>
+                                                  <Matrix a="0" b="0.3125" c="1" d="0" tx="70" ty="4.5"/>
                                              </matrix>
                                              <transformationPoint>
                                                   <Point x="40" y="1.5"/>
@@ -206,26 +208,26 @@
                               </DOMFrame>
                          </frames>
                     </DOMLayer>
-                    <DOMLayer name="btns" color="#4FFF4F" autoNamed="false">
+                    <DOMLayer name="btns" color="#4FFF4F" current="true" isSelected="true" autoNamed="false">
                          <frames>
                               <DOMFrame index="0" keyMode="9728">
                                    <elements>
-                                        <DOMSymbolInstance libraryItemName="RecordBtn" name="_recordBtn" symbolType="button">
+                                        <DOMSymbolInstance libraryItemName="PlayBtn" name="_playBtn" centerPoint3DX="200.5" centerPoint3DY="136.5">
                                              <matrix>
-                                                  <Matrix tx="63" ty="44"/>
-                                             </matrix>
-                                             <transformationPoint>
-                                                  <Point x="30" y="22"/>
-                                             </transformationPoint>
-                                        </DOMSymbolInstance>
-                                        <DOMSymbolInstance libraryItemName="PlayBtn" name="_playBtn" centerPoint3DX="200.5" centerPoint3DY="111.5">
-                                             <matrix>
-                                                  <Matrix tx="181" ty="89"/>
+                                                  <Matrix tx="181" ty="114"/>
                                              </matrix>
                                              <transformationPoint>
                                                   <Point x="19.5" y="22.5"/>
                                              </transformationPoint>
                                         </DOMSymbolInstance>
+                                        <DOMSymbolInstance libraryItemName="mic/Bouton Microphone" name="_recordBtn" symbolType="button">
+                                             <matrix>
+                                                  <Matrix a="0.999984741210938" d="0.999984741210938" tx="51" ty="33"/>
+                                             </matrix>
+                                             <transformationPoint>
+                                                  <Point/>
+                                             </transformationPoint>
+                                        </DOMSymbolInstance>
                                    </elements>
                               </DOMFrame>
                          </frames>
@@ -543,6 +545,11 @@
      </extendedSwatchLists>
      <PrinterSettings platform="macintosh"/>
      <publishHistory>
+          <PublishItem publishSize="23758" publishTime="1338996770"/>
+          <PublishItem publishSize="23763" publishTime="1338996749"/>
+          <PublishItem publishSize="23744" publishTime="1338996662"/>
+          <PublishItem publishSize="30369" publishTime="1338996556"/>
+          <PublishItem publishSize="30355" publishTime="1338996497"/>
           <PublishItem publishSize="30062" publishTime="1338896936"/>
           <PublishItem publishSize="30061" publishTime="1338896925"/>
           <PublishItem publishSize="30119" publishTime="1338896912"/>
@@ -558,11 +565,6 @@
           <PublishItem publishSize="30081" publishTime="1338895787"/>
           <PublishItem publishSize="30076" publishTime="1338895647"/>
           <PublishItem publishSize="30065" publishTime="1338895526"/>
-          <PublishItem publishSize="8759" publishTime="1338895497"/>
-          <PublishItem publishSize="184630" publishTime="1338892772"/>
-          <PublishItem publishSize="189633" publishTime="1338892081"/>
-          <PublishItem publishSize="189607" publishTime="1338892028"/>
-          <PublishItem publishSize="189607" publishTime="1338891955"/>
      </publishHistory>
      <swcCache>
           <Swc hashKey="kfuaIecnz3BPM/B8Awo4b." href="I06HM53Q5Z.swc">
--- a/script/record_mic/record_mic/LIBRARY/RecordBtn.xml	Wed Jun 06 15:53:30 2012 +0200
+++ b/script/record_mic/record_mic/LIBRARY/RecordBtn.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -1,18 +1,14 @@
-<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="RecordBtn" itemID="4fc8c1d3-00000282" sourceLibraryItemHRef="Symbole 1" symbolType="button" lastModified="1338805710">
+<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="RecordBtn" itemID="4fc8c1d3-00000282" sourceLibraryItemHRef="Symbole 1" symbolType="button" lastModified="1338996689">
   <timeline>
     <DOMTimeline name="RecordBtn" currentFrame="2">
       <layers>
         <DOMLayer name="Calque 1" color="#4FFF4F" current="true" isSelected="true">
           <frames>
             <DOMFrame index="0" keyMode="9728">
-              <elements>
-                <DOMBitmapInstance name="" referenceID="" libraryItemName="record.png"/>
-              </elements>
+              <elements/>
             </DOMFrame>
             <DOMFrame index="1" duration="3" keyMode="9728">
-              <elements>
-                <DOMBitmapInstance name="" referenceID="" selected="true" libraryItemName="record2.png"/>
-              </elements>
+              <elements/>
             </DOMFrame>
           </frames>
         </DOMLayer>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/record_mic/LIBRARY/mic/Bouton Microphone.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,58 @@
+<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="mic/Bouton Microphone" itemID="4fcf6f47-00000238" symbolType="button" lastModified="1338994814">
+  <timeline>
+    <DOMTimeline name="Bouton Microphone">
+      <layers>
+        <DOMLayer name="Layer 1" color="#4FFF4F" current="true" isSelected="true">
+          <frames>
+            <DOMFrame index="0" keyMode="9728">
+              <elements>
+                <DOMSymbolInstance libraryItemName="mic/fond" name="" selected="true" symbolType="button">
+                  <transformationPoint>
+                    <Point x="60" y="60"/>
+                  </transformationPoint>
+                  <filters>
+                    <DropShadowFilter strength="0.5"/>
+                  </filters>
+                </DOMSymbolInstance>
+                <DOMSymbolInstance libraryItemName="mic/micro" name="" selected="true" symbolType="button">
+                  <matrix>
+                    <Matrix tx="21.35" ty="10.85"/>
+                  </matrix>
+                  <transformationPoint>
+                    <Point x="35.65" y="48.8"/>
+                  </transformationPoint>
+                  <filters>
+                    <DropShadowFilter blurX="2" blurY="2" distance="2" inner="true" strength="0.5"/>
+                  </filters>
+                </DOMSymbolInstance>
+              </elements>
+            </DOMFrame>
+            <DOMFrame index="1" duration="3" keyMode="9728">
+              <elements>
+                <DOMSymbolInstance libraryItemName="mic/fond" name="" symbolType="button">
+                  <transformationPoint>
+                    <Point x="60" y="60"/>
+                  </transformationPoint>
+                  <filters>
+                    <DropShadowFilter inner="true" strength="0.5"/>
+                  </filters>
+                </DOMSymbolInstance>
+                <DOMSymbolInstance libraryItemName="mic/micro" name="" symbolType="button">
+                  <matrix>
+                    <Matrix tx="21.35" ty="10.85"/>
+                  </matrix>
+                  <transformationPoint>
+                    <Point x="35.65" y="48.8"/>
+                  </transformationPoint>
+                  <filters>
+                    <DropShadowFilter strength="0.5"/>
+                  </filters>
+                </DOMSymbolInstance>
+              </elements>
+            </DOMFrame>
+          </frames>
+        </DOMLayer>
+      </layers>
+    </DOMTimeline>
+  </timeline>
+</DOMSymbolItem>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/record_mic/LIBRARY/mic/fond.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,40 @@
+<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="mic/fond" itemID="4fcf6f2c-00000234" symbolType="button" lastModified="1338994477">
+  <timeline>
+    <DOMTimeline name="fond">
+      <layers>
+        <DOMLayer name="Layer 1" color="#4FFF4F" current="true" isSelected="true">
+          <frames>
+            <DOMFrame index="0" keyMode="9728">
+              <elements>
+                <DOMShape selected="true" isDrawingObject="true">
+                  <fills>
+                    <FillStyle index="1">
+                      <RadialGradient>
+                        <matrix>
+                          <Matrix a="0.0740203857421875" d="0.0740203857421875" tx="69" ty="74"/>
+                        </matrix>
+                        <GradientEntry color="#FFA0A0" ratio="0"/>
+                        <GradientEntry color="#E00000" ratio="1"/>
+                      </RadialGradient>
+                    </FillStyle>
+                  </fills>
+                  <edges>
+                    <Edge fillStyle1="1" edges="!2400 1200[2400 1697 2048 2048!2048 2048[1696 2400 1200 2400!1200 2400[703 2400 351 2048!351 2048[0 1697 0 1200!0 1200[0 703 351 352!351 352[703 0 1200 0!1200 0[1696 0 2048 352!2048 352[2400 703 2400 1200"/>
+                    <Edge cubics="!2048 352(;2283,586 2400,869 2400,1200q2048 352Q2400 703q2400 1200);"/>
+                    <Edge cubics="!0 1200(;0,869 117,586 351,352q0 1200Q0 703q351 352);"/>
+                    <Edge cubics="!351 352(351,352;586,117 869,0 1200,0q351 352Q703 0q1200 0);"/>
+                    <Edge cubics="!1200 2400(;869,2400 586,2283 351,2048q1200 2400Q703 2400q351 2048);"/>
+                    <Edge cubics="!1200 0(;1531,0 1813,117 2048,352q1200 0Q1696 0q2048 352);"/>
+                    <Edge cubics="!2400 1200(;2400,1531 2283,1814 2048,2048q2400 1200Q2400 1697q2048 2048);"/>
+                    <Edge cubics="!2048 2048(;1813,2283 1531,2400 1200,2400q2048 2048Q1696 2400q1200 2400);"/>
+                    <Edge cubics="!351 2048(;117,1814 0,1531 0,1200q351 2048Q0 1697q0 1200);"/>
+                  </edges>
+                </DOMShape>
+              </elements>
+            </DOMFrame>
+          </frames>
+        </DOMLayer>
+      </layers>
+    </DOMTimeline>
+  </timeline>
+</DOMSymbolItem>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/record_mic/record_mic/LIBRARY/mic/micro.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -0,0 +1,72 @@
+<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="mic/micro" itemID="4fcf6f43-00000237" symbolType="button" lastModified="1338995028">
+  <timeline>
+    <DOMTimeline name="micro">
+      <layers>
+        <DOMLayer name="Layer 1" color="#4FFF4F" current="true" isSelected="true">
+          <frames>
+            <DOMFrame index="0" keyMode="9728">
+              <elements>
+                <DOMShape isDrawingObject="true">
+                  <matrix>
+                    <Matrix tx="-1.5" ty="-2.15"/>
+                  </matrix>
+                  <transformationPoint>
+                    <Point x="21.9" y="23.3"/>
+                  </transformationPoint>
+                  <fills>
+                    <FillStyle index="1">
+                      <SolidColor color="#FFFFFF"/>
+                    </FillStyle>
+                  </fills>
+                  <edges>
+                    <Edge fillStyle1="1" edges="!802 522[779 672 656 762!656 762[532 852 382 829!382 829[232 806 143 683!143 683[52 560 75 410!75 410[98 260 222 170!222 170[344 80 494 103!494 103[644 126 735 249!735 249[825 372 802 522"/>
+                    <Edge cubics="!735 249(;795,331 818,421 802,522q735 249Q825 372q802 522);"/>
+                    <Edge cubics="!75 410(;91,309 140,230 222,170q75 410Q98 260q222 170);"/>
+                    <Edge cubics="!222 170(;304,110 394,88 494,103q222 170Q344 80q494 103);"/>
+                    <Edge cubics="!382 829(;282,814 203,765 143,683q382 829Q232 806q143 683);"/>
+                    <Edge cubics="!802 522(;787,622 738,702 656,762q802 522Q779 672q656 762);"/>
+                    <Edge cubics="!656 762(;574,822 483,845 382,829q656 762Q532 852q382 829);"/>
+                    <Edge cubics="!143 683(;83,601 60,510 75,410q143 683Q52 560q75 410);"/>
+                    <Edge cubics="!494 103(;595,119 675,167 735,249q494 103Q644 126q735 249);"/>
+                  </edges>
+                </DOMShape>
+                <DOMShape isDrawingObject="true">
+                  <matrix>
+                    <Matrix a="0.8876953125" b="0.13671875" c="-0.13671875" d="0.8876953125" tx="-10.5" ty="-9.7"/>
+                  </matrix>
+                  <transformationPoint>
+                    <Point x="70.55" y="63.85"/>
+                  </transformationPoint>
+                  <fills>
+                    <FillStyle index="1">
+                      <SolidColor color="#FFFFFF"/>
+                    </FillStyle>
+                  </fills>
+                  <edges>
+                    <Edge fillStyle1="1" edges="!1767 1862[1542 1668 1318 1473!1318 1473[869 1083 870 1080!870 1080|957 1069!957 1069[1061 1042 1145 965!1145 965[1226 891 1263 786!1263 786|1285 695!1285 695/1952 1705!1952 1705/1767 1862"/>
+                    <Edge cubics="!870 1080(;870,1080 1010,1088 1145,965q870 1080Q870 1080q957 1069Q1061 1042q1145 965);"/>
+                    <Edge cubics="!1145 965(;1274,847 1285,695 1285,695q1145 965Q1226 891q1263 786Q1285 695q1285 695);"/>
+                    <Edge cubics="!1285 695(;1285,695 1952,1705 1952,1705q1285 695 1952 1705);"/>
+                    <Edge cubics="!1952 1705(;1952,1705 1767,1862 1767,1862q1952 1705 1767 1862);"/>
+                    <Edge cubics="!1767 1862(;1767,1862 868,1085 870,1080q1767 1862Q1542 1668q1318 1473Q869 1083q870 1080);"/>
+                  </edges>
+                </DOMShape>
+                <DOMRectangleObject objectWidth="5" objectHeight="10" x="94.6" y="92.25" lockFlag="true">
+                  <matrix>
+                    <Matrix a="0.7596435546875" b="-0.479171752929688" c="0.479171752929688" d="0.7596435546875" tx="-55.9" ty="61.9"/>
+                  </matrix>
+                  <transformationPoint>
+                    <Point x="97.15" y="97.35"/>
+                  </transformationPoint>
+                  <fill>
+                    <SolidColor color="#FFFFFF"/>
+                  </fill>
+                </DOMRectangleObject>
+              </elements>
+            </DOMFrame>
+          </frames>
+        </DOMLayer>
+      </layers>
+    </DOMTimeline>
+  </timeline>
+</DOMSymbolItem>
\ No newline at end of file
Binary file script/record_mic/record_mic/LIBRARY/record.png has changed
Binary file script/record_mic/record_mic/LIBRARY/record2.png has changed
--- a/script/record_mic/record_mic/META-INF/metadata.xml	Wed Jun 06 15:53:30 2012 +0200
+++ b/script/record_mic/record_mic/META-INF/metadata.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -5,8 +5,8 @@
             xmlns:xmp="http://ns.adobe.com/xap/1.0/">
          <xmp:CreatorTool>Adobe Flash Professional CS5</xmp:CreatorTool>
          <xmp:CreateDate>2012-06-01T15:13:14+02:00</xmp:CreateDate>
-         <xmp:MetadataDate>2012-06-05T13:24:49+02:00</xmp:MetadataDate>
-         <xmp:ModifyDate>2012-06-05T13:24:49+02:00</xmp:ModifyDate>
+         <xmp:MetadataDate>2012-06-06T17:28:15+02:00</xmp:MetadataDate>
+         <xmp:ModifyDate>2012-06-06T17:28:15+02:00</xmp:ModifyDate>
       </rdf:Description>
       <rdf:Description rdf:about=""
             xmlns:dc="http://purl.org/dc/elements/1.1/">
@@ -15,7 +15,7 @@
       <rdf:Description rdf:about=""
             xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
             xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#">
-         <xmpMM:InstanceID>xmp.iid:ED7F1174072068118A6DA8FBD6380496</xmpMM:InstanceID>
+         <xmpMM:InstanceID>xmp.iid:01801174072068118C148E30A0C6CF2A</xmpMM:InstanceID>
          <xmpMM:DocumentID>xmp.did:F77F11740720681188C6EA8C8D268D08</xmpMM:DocumentID>
          <xmpMM:OriginalDocumentID>xmp.did:F77F11740720681188C6EA8C8D268D08</xmpMM:OriginalDocumentID>
          <xmpMM:History>
@@ -49,6 +49,12 @@
                   <stEvt:when>2012-06-01T15:13:14+02:00</stEvt:when>
                   <stEvt:softwareAgent>Adobe Flash Professional CS5</stEvt:softwareAgent>
                </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>created</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:01801174072068118C148E30A0C6CF2A</stEvt:instanceID>
+                  <stEvt:when>2012-06-01T15:13:14+02:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Flash Professional CS5</stEvt:softwareAgent>
+               </rdf:li>
             </rdf:Seq>
          </xmpMM:History>
       </rdf:Description>
--- a/script/record_mic/record_mic/PublishSettings.xml	Wed Jun 06 15:53:30 2012 +0200
+++ b/script/record_mic/record_mic/PublishSettings.xml	Wed Jun 06 18:31:09 2012 +0200
@@ -40,7 +40,7 @@
     <UsingOwnAlternateFile>0</UsingOwnAlternateFile>
     <OwnAlternateFilename></OwnAlternateFilename>
     <Width>220</Width>
-    <Height>140</Height>
+    <Height>160</Height>
     <Align>0</Align>
     <Units>0</Units>
     <Loop>1</Loop>
@@ -124,7 +124,7 @@
   </PublishFlashProperties>
   <PublishJpegProperties enabled="true">
     <Width>220</Width>
-    <Height>140</Height>
+    <Height>160</Height>
     <Progressive>0</Progressive>
     <DPI>4718592</DPI>
     <Size>0</Size>
@@ -150,7 +150,7 @@
   </PublishRNWKProperties>
   <PublishGifProperties enabled="true">
     <Width>220</Width>
-    <Height>140</Height>
+    <Height>160</Height>
     <Animated>0</Animated>
     <MatchMovieDim>1</MatchMovieDim>
     <Loop>1</Loop>
@@ -169,7 +169,7 @@
   </PublishGifProperties>
   <PublishPNGProperties enabled="true">
     <Width>220</Width>
-    <Height>140</Height>
+    <Height>160</Height>
     <OptimizeColors>1</OptimizeColors>
     <Interlace>0</Interlace>
     <Transparent>0</Transparent>
@@ -186,7 +186,7 @@
   </PublishPNGProperties>
   <PublishQTProperties enabled="true">
     <Width>220</Width>
-    <Height>140</Height>
+    <Height>160</Height>
     <MatchMovieDim>1</MatchMovieDim>
     <UseQTSoundCompression>0</UseQTSoundCompression>
     <AlphaOption></AlphaOption>
Binary file script/record_mic/record_mic/bin/SymDepend.cache has changed