 
			
				21/06/2010, 16:16
			
			
			     |  
      |    |    |    Fecha de Ingreso: enero-2009  
						Mensajes: 5
					  Antigüedad: 16 años, 9 meses Puntos: 0     |        |  
  |      Detección de movimiento con Ostrich web cam        Hola he estado jugando con la deteccion de movimiento usando la librería Open Source [URL="http://ostrichflash.wordpress.com/"]Ostrich[/URL] basada en As3, he logrado correrla  pero hay algo especial que quiero hacer con ella. Es simple pero complicado para mí porque mis nociones de as3 son básicas, quiero que la camara detecte el movimiento (cosa que ya se logra con la librería mencionada) pero además de ello que pueda controlar mi cursor (puntero, mouse) de mi pc .   
Ejemplo :    
1- me muevo a la izquierda el cursor se mueve a la izquierda.   
El actual código que tengo es el siguiente :     
package samples {   
	import flash.display.MovieClip; 
	import flash.events.*; 
	import flash.utils.Timer;   
	import com.danzen.interfaces.ostrich.*;   
	// class to make a custom cursor follow the motion in a Web cam 
	// just do not add the OstrichCursor object to the stage but follow it 
	// use an ENTER_FRAME event to animate your own cursor - like the fairy...   
	public class Fairy extends MovieClip {   
		private var myCamera:OstrichCamera; 
		private var myCursor:OstrichCursor;   
		public function Fairy() {			   
			trace ("hi from Fairy");   
			// make an OstrichCamera object			 
			myCamera = new OstrichCamera();	 
			addChild(myCamera);				 
			myCamera.alpha = .2;	 
			myCamera.addEventListener(OstrichCamera.READY, init);			 
		}   
		private function init(e:Event) { 
			setChildIndex(myFairy, numChildren-1); 
			// make an OstrichCursor object (there are more parameters available) 
			myCursor = new OstrichCursor(myCamera); 			 
			// uncomment this to see the cursor 
			// addChild(myCursor);				 
			addEventListener(Event.ENTER_FRAME, animate);   
		}		     
		private function animate(e:Event) { 
			// make the fairy flip its direction 
			if (myFairy.x < myCursor.x) { 
				myFairy.scaleX = -.7; 
			} else { 
				myFairy.scaleX = .7; 
			} 
			// make the fairy follow the OstrichCursor object 
			myFairy.x = myCursor.x; 
			myFairy.y = myCursor.y; 
		}     
	}   
}   
y es el que me gustaria me ayuden a modificar, gracias           |