4 Replies Latest reply on Nov 11, 2006 5:38 PM by Brenton07

    Sound but no video with Netstream from button

    Brenton07 Level 1
      I've searched around, and can't seem to find what's wrong here. I'm working a project that has an interface that will have a scroll pane that is dynamically updated. User can click on any of the thumbnails (buttons) in the pane to load a video in a video component.

      Right now, I have thumbnails inside a movieclip. They each have the following standard actionscript for loading external flv's. This fashion loads the sound of the external .flv, but not the video into the pane.

      I thought this may be because I have masked layers, so I ran a test with a button on the main stage, not in the movieclip, and using the same code it loads the video and sound just fine. I'm working with AS 2.0 and Flash 8, and used the "new video" from the library options menu that is action script controlled... any pointers?

        • 1. Re: Sound but no video with Netstream from button
          arunbe Level 1
          Hi,
          Hope you having more buttons with this same script.
          Look , it will be cause some problem , if you are using more Netconnections in a single swf file.
          So, better try out like this.
          Just declare NetConnection and NetStream Objects in the stage.

          //In the frame
          var connection_nc:NetConnection = new NetConnection();
          connection_nc.connect(null);
          var stream_ns:NetStream = new NetStream(connection_nc);
          my_video.attachVideo(stream_ns);

          then write like this in each button...

          on (release) {
          stream_ns.play("video.flv");
          }


          This wil help you ..

          • 2. Re: Sound but no video with Netstream from button
            Brenton07 Level 1
            ok, that makes sense. I tried doing that, and the connection still works, but still no video. I've tried applying the netconnection action script in both the frame of the scene and in the movieclip with the thumbnails (by the way, which is more appropriate? Or does it just depend if anything outside the movieclip will be using the viewer?)
            • 3. Re: Sound but no video with Netstream from button
              Brenton07 Level 1
              ok, figured it out! The action-script was referring to video compenent instance on the main stage, so I needed to reference the root like the following on the first frame of the thumbnail movieclip! Hope this helps someone else, it's a little mistake that makes all the difference!!
              • 4. Re: Sound but no video with Netstream from button
                Brenton07 Level 1
                ok, figured it out! The action-script was referring to video compenent instance on the main stage, so I needed to reference the root like the following on the first frame of the thumbnail movieclip! Hope this helps someone else, it's a little mistake that makes all the difference!!