4 Replies Latest reply on May 23, 2009 6:55 PM by bruce1976

    NetStream.onStatus/end of video?

    brian914 Level 1

      I would like to trigger a function when my video is done playing.

      So far I have this:

      var videoLength:Number;

       

       

      ns.onMetaData = function(infoObject:Object) {

          videoLength = infoObject.duration;

      };

       

       

       

       

      ns.onStatus = function(info:Object) {

           //is there a way to check here if the playhead position

           //is equal to the videoLength?

       

           //I also looked at this:

       

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

       

           }

       

      }

       

       

      Not sure how this would be done? Does Stop get triggered everytime the video stops?

       

      Thank you!