0 Replies Latest reply on Aug 3, 2007 7:29 PM by

    video player only plays sound, not video

      I am trying to load a swf that contains the actionscript for a video player into another fla (my portfolio site). My site is www.dg8tal.com/design.html. Currently, my site loads swf's or jpegs into the loader area when different menu items are clicked. I am trying to add a new swf (that contains a the actionscript for a video player and streams an flv). When I load this into my portfolio site, the sound plays, and the controls work (rewind, play/pause, and mute) but the buffer animation just keeps playing and I never see the video.

      The code for the video player portion is:

      var my_nc:NetConnection = new NetConnection();
      my_nc.connect(null);
      var ns:NetStream = new NetStream(my_nc);


      //Buffer
      ns.setBufferTime(15);
      ns.onStatus = function(info){
      if(info.code == "NetStream.Buffer.Full"){
      bufferClip._visible = false;
      }
      if(info.code == "NetStream.Buffer.Empty"){
      bufferClip._visible = false;
      }
      }

      _root.video.theVideo.attachVideo(ns);
      ns.play(" http://www.dg8tal.com/podcastintro.flv");
      _global.ifplaying = true;



      //Video Controls
      rewind_but.onRelease = function(){
      ns.seek(0);
      }


      //Pause/Play button
      pause_but.onRelease = function(){
      if(ifplaying == true){
      _root.pause_but.gotoAndStop("playstate");
      ns.pause();
      ifplaying = false;
      }
      else {
      _root.pause_but.gotoAndStop("pausestate");
      ifplaying = true;
      ns.pause();
      }
      }


      //Mute Button
      _root.createEmptyMovieClip("vSound", _root.getNextHighestDepth());
      vSound.attachAudio(ns);

      var so:Sound = new Sound(vSound);

      so.setVolume(100);

      mute_but.onRelease = function(){
      if(so.getVolume() == 100){
      _root.mute_but.gotoAndStop("mute");
      so.setVolume(0);
      }
      else{
      _root.mute_but.gotoAndStop("unmute");
      so.setVolume(100);
      }
      }

      Any ideas?

      Thanks!