0 Replies Latest reply on Oct 10, 2007 11:56 AM by lapindigo

    Flex 2 - AS3:  Video UI Component - method "clear()" not working

    lapindigo
      Hi everybody,

      I meet an amazing problem with Flex 2.

      I have created an MXML application streaming/publishing videos (webcams) from FMS2.

      I have instanciated a Video:UIComponent applying such methods:

      RemoteVideoHolder = new UIComponent();
      remoteVideo = new Video(394, 294);
      RemoteVideoHolder.addChild(remoteVideo);

      nc = new NetConnection();
      nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
      nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, netSecurityError);

      /* Custom Event from FMS */

      nc.connect(<hidden>);

      ...

      inStream = new NetStream(nc);

      private function change_remote_view():void
      {
      ....

      classRoot.remoteVideo.attachNetStream(null);
      classRoot.inStream.close();
      classRoot.remoteVideo.clear();

      classRoot.remoteVideo.attachNetStream(classRoot.inStream);
      classRoot.inStream.play(classRoot.current_stream);
      }

      I can stream videos from the server, the problem is not here
      When I want to switch between streams (see method "change_remote_view'), the video object take longs to refresh the image and if no stream exists under the name "classRoot.current_stream", the image stays with last image catched from the stream (like frozen) instead of cleaning the video object.


      I have seen from Adobe Bug Report that a similar problem appears and it has been SOLVED but they do not mention how.

      Could anyone explain me where I'm wrong and how to solve my issue.

      Best regards,

      Digo