1 Reply Latest reply on May 15, 2007 9:30 PM by Rahul Mainkar

    VideoDisplay control

    spacehog Level 1
      According to the Developers guide in flexbuilder 2 you can use the videodisplay control to stream video. The code they show is this:

      <?xml version="1.0"?>
      <!-- controls\videodisplay\VideoDisplayCamera.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

      <mx:Script>
      <![CDATA[

      // Define a variable of type Camera.
      import flash.media.Camera;
      public var cam

      public function initCamera():void {
      // Initialize the variable.
      cam = Camera.getCamera();
      myVid.attachCamera(cam)
      }
      ]]>
      </mx:Script>

      <mx:VideoDisplay id="myVid"
      width="320" height="240"
      creationComplete="initCamera();"/>
      </mx:Application>

      So they are creating a camera object using the creationComplete event in the videoDisplay control.

      My question is how does the control know where the camera is. If I have the camera connected to my laptop (via USB) and my laptop is on the network, how do I point the control to the camera?