2 Replies Latest reply on Mar 14, 2007 12:51 PM by german01

    FLV won't play

    WarrenVIP Level 1
      Is there any reason that an FLV would pause on its first frame all on its own? When I do a: stream_ns.onStatus = function(infoObject:Object) {
      trace("infoObject: "+infoObject.code);} It traces out that it should be playing... but, its not. Any ideas? It won't even play when I try a stream_ns.play() or pause(). Thanks for any light anyone can shed on this.
      _warren
        • 1. Re: FLV won't play
          WarrenVIP Level 1
          here is the code if anyone wants to check it. I'm sure I did something wrong here.

          ATTACH CODE------------------------------------------------------------------------------------- ---
          var my_xml = new XML();
          my_xml.ignoreWhite = true;
          my_xml.html = true;
          my_xml.onLoad = function(success) {
          if (success) {
          var videos = this.firstChild.childNodes;
          var number_vids:Number = videos.length;
          for (var i = 0; i<number_vids; i++) {
          var currVid = videos ;
          var currVidElements = currVid.childNodes;
          var currVidTitle = currVid.firstChild;
          var currVidImageFile = currVidTitle.nextSibling;
          var currVidImageFile_str = currVidImageFile.firstChild.toString();
          var currVidHead = currVidImageFile.nextSibling;
          var currVidVidFile = currVidHead.nextSibling;
          var currVidVidFile_str = currVidVidFile.firstChild.toString();
          var currVidLength = currVidVidFile.nextSibling;
          var currVidLink = currVidLength.nextSibling;
          var currVidLink_str = currVidLink.firstChild.toString();
          // trace("Elements "+i+": "+currVidElements.length);
          // trace("Title "+i+": "+currVidTitle.firstChild);
          //trace("Image File "+i+": "+currVidImageFile.firstChild);
          // trace("Head "+i+": "+currVidHead.firstChild);
          // trace("Video File "+i+": "+currVidVidFile.firstChild);
          // trace("Length "+i+": "+currVidLength.firstChild);
          // trace("Link "+i+": "+currVidLink.firstChild);
          var the_video = _root.vid_menu.vidClips.attachMovie("vidclip_master", "vidclip_"+i, 10+i, {_x:0, _y:90*i});
          the_video.onRelease = function() {
          var theString:MovieClip = this._name;
          var thesubString:String = new String();
          thesubString = (theString.substring(theString.lastIndexOf("_")+1, theString.length));
          var theNumString:Number = Number(thesubString)+1;
          // LOAD VIDEO
          load_the_vid(theNumString);
          //trace("videos/clip0"+theNumString+".flv");
          };
          B_lank.onRelease = function() {
          getURL(currVidLink_str, "_blank");
          };
          the_video.highlighter.onEnterFrame = function() {
          if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
          this._alpha = 100;
          } else {
          this._alpha = 0;
          }
          };
          the_video.image_holder.loadMovie(currVidImageFile_str);
          the_video.Clip_number.htmlText = currVidTitle.firstChild;
          the_video.Title.htmlText = currVidHead.firstChild;
          thevideo.Duration.html = true;
          the_video.Duration.htmlText = currVidLength.firstChild.nodeValue;
          }
          }
          };
          my_xml.load("videos_r2.xml");
          _root.vid_menu.scroller.up_but.onRelease = function() {
          clearInterval(moving_dn);
          };
          _root.vid_menu.scroller.dn_but.onRelease = function() {
          clearInterval(moving_up);
          };
          _root.vid_menu.scroller.up_but.onDragOut = function() {
          clearInterval(moving_dn);
          };
          _root.vid_menu.scroller.dn_but.onDragOut = function() {
          clearInterval(moving_up);
          };
          _root.vid_menu.scroller.up_but.onReleaseOutside = function() {
          clearInterval(moving_dn);
          };
          _root.vid_menu.scroller.dn_but.onReleaseOutside = function() {
          clearInterval(moving_up);
          };
          _root.vid_menu.scroller.up_but.onPress = function() {
          clearInterval(moving_up);
          moving_dn = setInterval(move_em_dn, 10);
          };
          _root.vid_menu.scroller.dn_but.onPress = function() {
          clearInterval(moving_dn);
          moving_up = setInterval(move_em_up, 10);
          };
          function move_em_up() {
          if (vid_menu.vidClips._y>=(-1*(vid_menu.vidClips._height-150))) {
          _root.vid_menu.vidClips._y -= 1;
          }
          }
          function move_em_dn() {
          if (vid_menu.vidClips._y<=10) {
          _root.vid_menu.vidClips._y += 1;
          }
          }
          function load_the_vid(theNumString:Number) {
          var connection_nc:NetConnection = new NetConnection();
          connection_nc.connect(null);
          var stream_ns:NetStream = new NetStream(connection_nc);
          stream_ns.setBufferTime(.1);
          thevideo.attachVideo(stream_ns);
          //stream_ns.play("videos/chris_close_for_import.flv");
          stream_ns.play("videos/clip0"+theNumString+".flv");
          stream_ns.onMetaData = function(infoObject:Object) {
          for (var propName in infoObject) {
          trace(propName+" = "+infoObject[propName]);
          }
          };
          stream_ns.onStatus = function(infoObject:Object) {
          trace("infoObject: "+infoObject.code);
          if (infoObject.code == "NetStream.Play.Start") {
          //stream_ns.pause();
          stream_ns.clear();
          }
          if (infoObject.code == "NetStream.Play.Stop") {
          }
          };
          }
          • 2. Re: FLV won't play
            german01
            Have you checked the parameters of the FLV playback instance on the stage?
            Make sure it is set to autoplay.

            German