0 Replies Latest reply on Jan 16, 2007 8:14 PM by weiwuliang

    Flex VideoDisplay tag

    weiwuliang Level 1
      Hi all,
      is there anyway for using VideoDisplay tag for play mulit FLV files?
      I have to to using the NetStream here is the code show below:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Panel x="10" y="10" width="640" height="540" layout="absolute" title="try">
      <mx:Canvas id="videoBox1" x="10" y="29" width="160" height="120"/>
      </mx:Panel>
      <mx:Script>
      <![CDATA[
      import flash.media.Video;
      import flash.net.*;

      private var videoURL:String = "upload/12sec.flv";

      private var nc:NetConnection = new NetConnection();
      nc.connect(null);

      var stream:NetStream = new NetStream(connection);
      //stream.publish(false);

      var myVideo:Video = new Video(360, 240);
      myVideo.attachNetStream(stream);
      stream.play(videoURL);

      videoBox1.addChild(myVideo);
      ]]>
      </mx:Script>
      </mx:Application>

      I also try a sample code in the Help document of Flex2 by search keyword of "Working with video", But it looks no working in the Flex builer2 it alwasy showing the error message while it using the connect(null) as the message "1120: Access of undefined property nc".

      anyway is there any way for play the multi flv file or flv file + image play them 1 by 1 in teh video object?