2 Replies Latest reply on Nov 6, 2006 9:51 AM by total2k3

    Flash Comms script

    total2k3
      Guys,
      I'd be most grateful if someone can help me with the below flashcomm script.

      I'm trying to take a screenshot of a video stream and store it on my server as a jpeg file.

      I made a test file which takes a screenshot of whats on my webcam, convert it to a bitmap and then send it piece by piece to my php file and put it together with GD. That all works perfectly.


      For example:

      _root.mycam = Camera.get();
      _root.myvideo.attachVideo(_root.mycam);

      bmp= new BitmapData(144, 104, true, 0x00000000);
      bmp.draw(_root.myvideo);

      And then i split it up and send it.

      However when i then change it to convert a video stream into a bitmap it doesn't seem to get anywhere.

      For example:

      _root.camstream = new NetStream(_root.nc);
      _root.camstream.onStatus = function(infoObject)
      {
      if(infoObject.code == "NetStream.Play.Start")
      {
      _root.myvideo.attachVideo(_root.camstream);

      bmp= new BitmapData(144, 104, true, 0x00000000);
      bmp.draw(_root.myvideo);
      }
      }
      _root.camstream.play("thatuserscam");

      Thats not exactly my code but thats a simple version of it

      Does anyone have any idea why this might happen? and any clues how to get around this??

      Many thanks in advance.