1 Reply Latest reply on May 27, 2008 1:53 PM by slaingod

    Flex WebCam App, .SWF to FLV

    Hardzinn
      Hey..
      im trying to put my webcam in my site, actually im using this:

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"

      creationComplete="this.onComplete();">

      <mx:Script>
      <![CDATA[
      import mx.core.UIComponent;
      import flash.media.*;

      private var _cam:camera;
      private var _mic:Microphone;
      private var _cameraVideo:Video;

      private function onComplete():void
      {
      this.createVideo();
      this.runCamera();
      }

      private function createVideo():void
      {
      this._cameraVideo = new Video(300, 200);
      var c1:UIComponent = new UIComponent();
      c1.width = 300;
      c1.height = 200;
      c1.addChild(this._cameraVideo);
      this.cntVideo.addChildAt(c1, 0);
      }

      private function runCamera():void
      {
      this._cam = Camera.getCamera();
      this._mic = Microphone.getMicrophone();
      this._cameraVideo.attachCamera(this._cam);
      }

      ]]>
      </mx:Script>

      <mx:HBox id="cntVideo" />

      </mx:Application>

      This code, i got here, in another topic.
      But with this, all that i can do is start the .swf, starting the webcam on the computer that started the .swf.

      What I want is start my web cam with this .swf and show it, in web. And what i'am doing it's share the application.
      Anyway thank's
      Anyone can help me?!
        • 1. Re: Flex WebCam App, .SWF to FLV
          slaingod Level 1
          You would need to use Flash Media Server or Red5 to stream your webcam to the server. This is probably not what you really want tho. What it sounds like you need is an app (probably not flex) that will stream to your server running FMS or Red5 and then use the VideoDisplay to simply attach to that video feed.