5 Replies Latest reply on Nov 18, 2013 12:12 PM by Ned Murphy

    How get info when *flv is finished?

    TELLO_DE

      Hi NG,

       

      i load different *flv in my *swf. In my *flv are no key points.

      How can i get in AS2 the information, when the *flv endet? Because i need the information to load than some other *flv or pictures...

       

      Is there any idea?

       

       

      Thanks

      TELLO

        • 1. Re: How get info when *flv is finished?
          Ned Murphy Adobe Community Professional & MVP

          If you are using the FLVPlayback component, see the following help document:

           

          http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00002391.html

          • 2. Re: How get info when *flv is finished?
            TELLO_DE Level 1

            I dont use the FLVPlayback component.

             

             

             

            TELLO

            • 3. Re: How get info when *flv is finished?
              Ned Murphy Adobe Community Professional & MVP

              How do you load it then?  If you want help you need to provide information.

              • 4. Re: How get info when *flv is finished?
                TELLO_DE Level 1

                UPS,

                 

                i guess i made mistake. I guess i use the Playback components without skin?

                 

                The code on the beginning:

                 

                 

                var myNetconnection;

                var myStream;

                var myStreamDuration;

                var stopped=false;

                var lastDelta=0;

                 

                 

                loadVideo = function (videoUrl) 

                {

                          myNetconnection = new NetConnection();

                          myNetconnection.connect(null);

                          myStream = new NetStream(myNetconnection);

                          myStream.setBufferTime(3);

                          my_video.attachVideo(myStream);

                          myStream.play(videoUrl);

                          myStreamDuration=0;

                          _root.vurl=videoUrl;

                 

                          myStream.onStatus = function(info)

                          {

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

                             {

                                       // Set flag, we will need to wait for "NetStream.Buffer.Empty" before

                                       // actually restarting the movie.

                                              stopped=true;

                             }

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

                             {

                                              // At this point, the movie has stopped, and the buffer is empty.

                                              // We're ready to restart the movie.

                                              if (stopped)

                                              {

                                                          myStream.seek(0)

                                                        myStream.play(videoUrl);

                                                        stopped=false;

                                              }

                             }            

                          }

                 

                          myStream.onMetaData = function(obj)

                          {

                                    myStreamDuration=obj.duration;

                          }

                };

                 

                 

                TELLO

                • 5. Re: How get info when *flv is finished?
                  Ned Murphy Adobe Community Professional & MVP

                  If you are using the NetStream class you are not using any component.  What you should be able to do is to check for the NetStream.Play.Complete via the NetStream.onPlayStatus event monitoring.

                   

                  Here is a link that provides some details:

                   

                  http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=00000181.html

                   

                  If you want more information you should try searching Google using terms like "AS2 NetStream.onPlayStatus"

                   

                  For the code you show it should be able to be used similarly to the way you monitor the onStatus event monitoring.