1 Reply Latest reply on Jun 23, 2010 7:58 AM by kglad

    How to make the buffer invisible until MouseOver in an flv player in AS2?

    fotofisk

      I am adding a swf to my website with a streaming flv player and I would like to make the buffer mc invisible until the invisible button covering the video player is moused over. I would like the net stream to begin when the page loads, but for the video to begin when the player is moused-over, and then pause when moused-off, right now the buffer is showing on page load and the animation is really distracting. Any advice would be greatly appreciated!

       

      This is the code I am working with:

       

       

      var nc:NetConnection = new NetConnection();

      nc.connect("rtmp://rtmphost.com/banner/");

      var ns:NetStream = new NetStream(nc);

       

      ns.setBufferTime(10); ns.onStatus = function(info) {

      if(info.code == "NetStream.Buffer.Full") {

      bufferclip._visible = false;      };

      if(info.code == "NetStream.Buffer.Empty") {

      bufferclip._visible = true;      };

      if(info.code == "NetStream.Play.Stop") {

      ns.seek(0);

      };

      }

      my_video.attachVideo(ns);

      ns.play("mp4:video_file.f4v");

      ns.pause(true);

       

      invisible_btn.onRollOver = function() {

      ns.pause(false);

      playclip._visible = false;

      }

       

      invisible_btn.onRollOut = function() {

      ns.pause(true);

      playclip._visible = true;

      bufferclip._visible = false;

      }