Re: [Flashcoders] how to know that thae video is finished? usingFLVPlayback
Heya Helen, You're correct, they're still there ;-) I was looking in the Classes directory for the as files themselves, without checking the components panel in the Flash IDE so assumed mx.controls.MediaDisplay was replaced by the FLVPlayback. Have you tried setting the isLive property to true before setting the contentPath? Also make sure to install the FLVPlayback update as it fixes some issues with streaming FLV's from FMS. http://www.adobe.com/support/flash/downloads.html http://download.macromedia.com/pub/flash/updates/flvplayback/flvplayback_1_0_1.zip technote (mostly goes on about SMIL though): http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=3acdb2ff And one last thing, try leaving off the extension (.flv) when streaming from FMS. Haven't done anything with streaming video in a long time, so not sure about that one.. regards, Muzak - Original Message - From: "Helen Triolo" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, January 18, 2007 2:12 PM Subject: Re: [Flashcoders] how to know that thae video is finished? usingFLVPlayback > The MediaPlayback components do still exist -- they're just listed in the > Flash 6-7 folder in the components window. I wanted to > use FLVPlayback for a recent video project but I can't get it to display the > streamed videos that are working fine with the > MediaPlayback component. For the latter, I use > > setMedia("rtmp:/LT/myfile.flv") > > but there is no setMedia command for FLVPlayback, only contentPath, and > setting it to the above doesn't work, nor did setting > contentPath = "rtmp:///LT/myfile.flv" or "rtmp:// address>/LT/stream/_definst_/myfile.flv" -- any > suggestions? > > Helen > > Muzak wrote: > >>Flash 8 has a new (and improved) Video component >>mx.controls.MediaDisplay no longer exists in Flash 8 and is replaced with >>mx.video.FLVPlayback >>http://livedocs.macromedia.com/flash/8/main/3477.html >> >>FLVPlayback component has a "complete" event: >>http://livedocs.macromedia.com/flash/8/main/3537.html >> >>regards, >>Muzak >> >>- Original Message - >>From: "Karina Steffens" <[EMAIL PROTECTED]> >>To: "'Flashcoders mailing list'" >>Sent: Thursday, January 18, 2007 1:23 PM >>Subject: RE: [Flashcoders] how to know that thae video is finished? >> >> >> >>>Isn't it amazing that Adobe/MM never bothered setting up a simple >>>onStopMovie event?... >>> ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Whatever works for you is good. My point was this: Instead of duration, you can compare ns.time to the exact timestamp of the last tag (Of course you need to have that value first). Best regards, Burak www.asvguy.com - Original Message - From: "natalia Vikhtinskaya" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, January 18, 2007 6:21 PM Subject: Re: [Flashcoders] how to know that thae video is finished? > All these codes work well if ns.onStatus==NetStream.Play.Start. But I have > example of video that plays and has the end but never show this status. > I checked and for example function endOfVideoDetector always give me false > even if the video is over. So only withinNSecondsOfEnd work correctly. > > > 2007/1/18, Burak KALAYCI <[EMAIL PROTECTED]>: > > > > Hi, > > > > ns.time returns only timestamps of actual tags in a FLV, which means it > > will > > never return the duration but only the timestamp of the last tag: > > http://www.asvguy.com/2005/03/position_of_the.html > > > > Best regards, > > Burak > > www.asvguy.com > > > > Burak KALAYCI, Manitu Group > > http://www.buraks.com > > http://www.manitugroup.com > > > > - Original Message - > > From: "Helen Triolo" <[EMAIL PROTECTED]> > > To: "Flashcoders mailing list" > > Sent: Thursday, January 18, 2007 4:51 PM > > Subject: Re: [Flashcoders] how to know that thae video is finished? > > > > > > > Does ns.time trace something close to duration, just not exactly equal > > > at the end? If so, just check for >= duration - somesmallamount (maybe > > > to do with the buffer size) instead of ==. Is this a progressive or > > > streamed flv, btw? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
All these codes work well if ns.onStatus==NetStream.Play.Start. But I have example of video that plays and has the end but never show this status. I checked and for example function endOfVideoDetector always give me false even if the video is over. So only withinNSecondsOfEnd work correctly. 2007/1/18, Burak KALAYCI <[EMAIL PROTECTED]>: Hi, ns.time returns only timestamps of actual tags in a FLV, which means it will never return the duration but only the timestamp of the last tag: http://www.asvguy.com/2005/03/position_of_the.html Best regards, Burak www.asvguy.com Burak KALAYCI, Manitu Group http://www.buraks.com http://www.manitugroup.com - Original Message - From: "Helen Triolo" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, January 18, 2007 4:51 PM Subject: Re: [Flashcoders] how to know that thae video is finished? > Does ns.time trace something close to duration, just not exactly equal > at the end? If so, just check for >= duration - somesmallamount (maybe > to do with the buffer size) instead of ==. Is this a progressive or > streamed flv, btw? > > I dug up this old flashcomm post from Brandon Krakowsky in case it's any > use: > > > I noticed that as well. I've never had good luck with > > "NetStream.Play.Stop". I think part of the problem is that > > some FLVs never get to the very end of the file - maybe .5 > > seconds before the end. > > The other part of the problem might be the encoder you're > > using. Flash 8 Encoder vs. Riva vs. Flix. > > > > I avoid the whole thing by monitoring the playhead inside of > > a setInterval or onEnterFrame, and comparing it to the > > totalTime. This way, I never have to worry about those > > objects not firing. Once again, I DO run into the problem > > where the playhead doesn't get all the way to the end, so > > tend to look for the playhead to be .5 seconds from the end, > > or more. Seems to do the trick everytime. Of course, if you > > can, make sure the videos have a little extra something at > > the end so they don't get cut off. > > > Helen > > natalia Vikhtinskaya wrote: > > > So as I understand no way to determine that video is finished with > > NetStream > > object? > > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Hi, ns.time returns only timestamps of actual tags in a FLV, which means it will never return the duration but only the timestamp of the last tag: http://www.asvguy.com/2005/03/position_of_the.html Best regards, Burak www.asvguy.com Burak KALAYCI, Manitu Group http://www.buraks.com http://www.manitugroup.com - Original Message - From: "Helen Triolo" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, January 18, 2007 4:51 PM Subject: Re: [Flashcoders] how to know that thae video is finished? > Does ns.time trace something close to duration, just not exactly equal > at the end? If so, just check for >= duration - somesmallamount (maybe > to do with the buffer size) instead of ==. Is this a progressive or > streamed flv, btw? > > I dug up this old flashcomm post from Brandon Krakowsky in case it's any > use: > > > I noticed that as well. I've never had good luck with > > "NetStream.Play.Stop". I think part of the problem is that > > some FLVs never get to the very end of the file - maybe .5 > > seconds before the end. > > The other part of the problem might be the encoder you're > > using. Flash 8 Encoder vs. Riva vs. Flix. > > > > I avoid the whole thing by monitoring the playhead inside of > > a setInterval or onEnterFrame, and comparing it to the > > totalTime. This way, I never have to worry about those > > objects not firing. Once again, I DO run into the problem > > where the playhead doesn't get all the way to the end, so > > tend to look for the playhead to be .5 seconds from the end, > > or more. Seems to do the trick everytime. Of course, if you > > can, make sure the videos have a little extra something at > > the end so they don't get cut off. > > > Helen > > natalia Vikhtinskaya wrote: > > > So as I understand no way to determine that video is finished with > > NetStream > > object? > > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
I think the onComplete is only available via FMS, i think. There are a bunch of threads in the archives about this scenario but they can be difficult to find. Brian Lesser has some really good information on his site: http://echo.ryerson.ca/textPublisher/index.html /** * This function is assigned to the playing stream onStatus in place * of the default onStatus handler above. * It writes all info.code messages to the text window as well * but also detects when the stream ends and * changes the button back to "Play" and closes the stream. * A stream has ended when two things happen in order: * 1. NetStream.Play.Stop, followed by * 2. NetStream.Buffer.Empty */ NetStreamPlay_onStatus = function(info){ writeln("NetStream.onStatus> info.code: " + info.code); if (info.code == "NetStream.Play.Stop"){ this.seenStop = true; } else if (info.code == "NetStream.Buffer.Empty" && this.seenStop){ this.close(); play_btn.setLabel("Play"); publish_btn.setEnabled(true); this.seenStop = false; } else if (info.code == "NetStream.Play.Start"){ this.seenStop = false; } } Hank Williams takes a different approach: http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2005-February/131759.html if you have set a buffer for the video, the first approach doesn't always seem to work. Dunc On 1/18/07, natalia Vikhtinskaya <[EMAIL PROTECTED]> wrote: yes very close When the video is finished ns.time=228.528 and duration=228.66; So ns.time>=duration-0.5 give me good result. I don't know how flv was created. So this way allow me to find what I need. Thank you very much. 2007/1/18, Helen Triolo <[EMAIL PROTECTED]>: > > Does ns.time trace something close to duration, just not exactly equal > at the end? If so, just check for >= duration - somesmallamount (maybe > to do with the buffer size) instead of ==. Is this a progressive or > streamed flv, btw? > > I dug up this old flashcomm post from Brandon Krakowsky in case it's any > use: > > > I noticed that as well. I've never had good luck with > > "NetStream.Play.Stop". I think part of the problem is that > > some FLVs never get to the very end of the file - maybe .5 > > seconds before the end. > > The other part of the problem might be the encoder you're > > using. Flash 8 Encoder vs. Riva vs. Flix. > > > > I avoid the whole thing by monitoring the playhead inside of > > a setInterval or onEnterFrame, and comparing it to the > > totalTime. This way, I never have to worry about those > > objects not firing. Once again, I DO run into the problem > > where the playhead doesn't get all the way to the end, so > > tend to look for the playhead to be .5 seconds from the end, > > or more. Seems to do the trick everytime. Of course, if you > > can, make sure the videos have a little extra something at > > the end so they don't get cut off. > > > Helen > > natalia Vikhtinskaya wrote: > > > So as I understand no way to determine that video is finished with > > NetStream > > object? > > > > 2007/1/18, Karina Steffens <[EMAIL PROTECTED]>: > > > >> > >> Sorry, it's bee a while since I wrote that script, so I forgot to > >> mention > >> that movie_flv in my code is an AS2 Video Playback component that has > >> the > >> movie attached to it instead of a simple movie clip. It's located in > the > >> components panel. You might want to try theVideo.playheadTimeinstead, > >> but > >> if that doesn't work, you could try using this component instead. Or > >> better > >> yet, if you're using Flash 8, try the new video component that Muzak > >> mentioned (Flv Playback) which has a "complete" event. > >> > >> PS: I just saw Helen's post - that's definitely worth a try. > >> > >> Karina > >> > >> > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
yes very close When the video is finished ns.time=228.528 and duration=228.66; So ns.time>=duration-0.5 give me good result. I don't know how flv was created. So this way allow me to find what I need. Thank you very much. 2007/1/18, Helen Triolo <[EMAIL PROTECTED]>: Does ns.time trace something close to duration, just not exactly equal at the end? If so, just check for >= duration - somesmallamount (maybe to do with the buffer size) instead of ==. Is this a progressive or streamed flv, btw? I dug up this old flashcomm post from Brandon Krakowsky in case it's any use: > I noticed that as well. I've never had good luck with > "NetStream.Play.Stop". I think part of the problem is that > some FLVs never get to the very end of the file - maybe .5 > seconds before the end. > The other part of the problem might be the encoder you're > using. Flash 8 Encoder vs. Riva vs. Flix. > > I avoid the whole thing by monitoring the playhead inside of > a setInterval or onEnterFrame, and comparing it to the > totalTime. This way, I never have to worry about those > objects not firing. Once again, I DO run into the problem > where the playhead doesn't get all the way to the end, so > tend to look for the playhead to be .5 seconds from the end, > or more. Seems to do the trick everytime. Of course, if you > can, make sure the videos have a little extra something at > the end so they don't get cut off. Helen natalia Vikhtinskaya wrote: > So as I understand no way to determine that video is finished with > NetStream > object? > > 2007/1/18, Karina Steffens <[EMAIL PROTECTED]>: > >> >> Sorry, it's bee a while since I wrote that script, so I forgot to >> mention >> that movie_flv in my code is an AS2 Video Playback component that has >> the >> movie attached to it instead of a simple movie clip. It's located in the >> components panel. You might want to try theVideo.playheadTime instead, >> but >> if that doesn't work, you could try using this component instead. Or >> better >> yet, if you're using Flash 8, try the new video component that Muzak >> mentioned (Flv Playback) which has a "complete" event. >> >> PS: I just saw Helen's post - that's definitely worth a try. >> >> Karina >> >> ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Does ns.time trace something close to duration, just not exactly equal at the end? If so, just check for >= duration - somesmallamount (maybe to do with the buffer size) instead of ==. Is this a progressive or streamed flv, btw? I dug up this old flashcomm post from Brandon Krakowsky in case it's any use: I noticed that as well. I've never had good luck with "NetStream.Play.Stop". I think part of the problem is that some FLVs never get to the very end of the file - maybe .5 seconds before the end. The other part of the problem might be the encoder you're using. Flash 8 Encoder vs. Riva vs. Flix. I avoid the whole thing by monitoring the playhead inside of a setInterval or onEnterFrame, and comparing it to the totalTime. This way, I never have to worry about those objects not firing. Once again, I DO run into the problem where the playhead doesn't get all the way to the end, so tend to look for the playhead to be .5 seconds from the end, or more. Seems to do the trick everytime. Of course, if you can, make sure the videos have a little extra something at the end so they don't get cut off. Helen natalia Vikhtinskaya wrote: So as I understand no way to determine that video is finished with NetStream object? 2007/1/18, Karina Steffens <[EMAIL PROTECTED]>: Sorry, it's bee a while since I wrote that script, so I forgot to mention that movie_flv in my code is an AS2 Video Playback component that has the movie attached to it instead of a simple movie clip. It's located in the components panel. You might want to try theVideo.playheadTime instead, but if that doesn't work, you could try using this component instead. Or better yet, if you're using Flash 8, try the new video component that Muzak mentioned (Flv Playback) which has a "complete" event. PS: I just saw Helen's post - that's definitely worth a try. Karina ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
So as I understand no way to determine that video is finished with NetStream object? 2007/1/18, Karina Steffens <[EMAIL PROTECTED]>: Sorry, it's bee a while since I wrote that script, so I forgot to mention that movie_flv in my code is an AS2 Video Playback component that has the movie attached to it instead of a simple movie clip. It's located in the components panel. You might want to try theVideo.playheadTime instead, but if that doesn't work, you could try using this component instead. Or better yet, if you're using Flash 8, try the new video component that Muzak mentioned (Flv Playback) which has a "complete" event. PS: I just saw Helen's post - that's definitely worth a try. Karina > -Original Message- > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 13:35 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Sorry, maybe I do something wrong but I can not get PlayHead Time > > > > var movie_flv:mx.controls.MediaDisplay; > > > > var nc:NetConnection=new NetConnection(); > > nc.connect(null); > > var ns:NetStream=new NetStream(nc); > > ns.setBufferTime(3); > > ns.onStatus=function(info){ > > if (info.code=="NetStream.Buffer.Full "){ > > bufferClip._visible=false; > > } > > if (info.code=="NetStream.BufferEmpty"){ > > bufferClip._visible=true; > > } > > if > (info.code=="NetStream.Play.Stop"){ //this place not always > works. So for some video > > > //it just stops at the end. I want it goes to the > > > //start position and paused. > > ns.seek(0); > > } > > > > } > > theVideo.attachVideo(ns); > > ns.play("video/shoeshdmaster_vp6520.flv"); > > > > var videoInterval=setInterval(videoStatus,10); > > > > ns["onMetaData"]=function(obj){ > > duration=obj.duration; > > } > > function videoStatus(){ > > trace(movie_flv.playheadTime) //show > undefined > > } > > > > 2007/1/18, Muzak <[EMAIL PROTECTED]>: > > > > Flash 8 has a new (and improved) Video component > > mx.controls.MediaDisplay no longer exists in Flash 8 and is > replaced > > with mx.video.FLVPlayback > > http://livedocs.macromedia.com/flash/8/main/00003477.html > > > > FLVPlayback component has a "complete" event: > > http://livedocs.macromedia.com/flash/8/main/3537.html > > > > regards, > > Muzak > > > > - Original Message - > > From: "Karina Steffens" <[EMAIL PROTECTED] > > > To: "'Flashcoders mailing list'" > > Sent: Thursday, January 18, 2007 1:23 PM > > Subject: RE: [Flashcoders] how to know that thae video is finished? > > > > > > > Isn't it amazing that Adobe/MM never bothered setting up a simple > > > onStopMovie event?... > > > > > > > > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] how to know that thae video is finished?
Sorry, it's bee a while since I wrote that script, so I forgot to mention that movie_flv in my code is an AS2 Video Playback component that has the movie attached to it instead of a simple movie clip. It's located in the components panel. You might want to try theVideo.playheadTime instead, but if that doesn't work, you could try using this component instead. Or better yet, if you're using Flash 8, try the new video component that Muzak mentioned (Flv Playback) which has a "complete" event. PS: I just saw Helen's post - that's definitely worth a try. Karina > -Original Message- > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 13:35 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Sorry, maybe I do something wrong but I can not get PlayHead Time > > > > var movie_flv:mx.controls.MediaDisplay; > > > > var nc:NetConnection=new NetConnection(); > > nc.connect(null); > > var ns:NetStream=new NetStream(nc); > > ns.setBufferTime(3); > > ns.onStatus=function(info){ > > if (info.code=="NetStream.Buffer.Full "){ > > bufferClip._visible=false; > > } > > if (info.code=="NetStream.BufferEmpty"){ > > bufferClip._visible=true; > > } > > if > (info.code=="NetStream.Play.Stop"){ //this place not always > works. So for some video > > > //it just stops at the end. I want it goes to the > > > //start position and paused. > > ns.seek(0); > > } > > > > } > > theVideo.attachVideo(ns); > > ns.play("video/shoeshdmaster_vp6520.flv"); > > > > var videoInterval=setInterval(videoStatus,10); > > > > ns["onMetaData"]=function(obj){ > > duration=obj.duration; > > } > > function videoStatus(){ > > trace(movie_flv.playheadTime) //show > undefined > > } > > > > 2007/1/18, Muzak <[EMAIL PROTECTED]>: > > > > Flash 8 has a new (and improved) Video component > > mx.controls.MediaDisplay no longer exists in Flash 8 and is > replaced > > with mx.video.FLVPlayback > > http://livedocs.macromedia.com/flash/8/main/3477.html > > > > FLVPlayback component has a "complete" event: > > http://livedocs.macromedia.com/flash/8/main/3537.html > > > > regards, > > Muzak > > > > - Original Message - > > From: "Karina Steffens" <[EMAIL PROTECTED] > > > To: "'Flashcoders mailing list'" > > Sent: Thursday, January 18, 2007 1:23 PM > > Subject: RE: [Flashcoders] how to know that thae video is finished? > > > > > > > Isn't it amazing that Adobe/MM never bothered setting up a simple > > > onStopMovie event?... > > > > > > > > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
ok I tryed function videoStatus(){ trace(ns.time==duration) } it is always false even when video is finished. 2007/1/18, Helen Triolo <[EMAIL PROTECTED]>: If you're using a NetStream object, then I believe you want ns.time, not playheadTime. Helen natalia Vikhtinskaya wrote: > Sorry, maybe I do something wrong but I can not get playheadTime > > > > var movie_flv:mx.controls.MediaDisplay; > > > > var nc:NetConnection=new NetConnection(); > > nc.connect(null); > > var ns:NetStream=new NetStream(nc); > > ns.setBufferTime(3); > > ns.onStatus=function(info){ > >if (info.code=="NetStream.Buffer.Full"){ > >bufferClip._visible=false; > >} > >if (info.code=="NetStream.BufferEmpty"){ > >bufferClip._visible=true; > >} > >if (info.code=="NetStream.Play.Stop"){ //this > place > not always works/ So when video finished > >ns.seek(0); > >} > > > > } > > theVideo.attachVideo(ns); > > ns.play("video/shoeshdmaster_vp6520.flv"); > > > > > > var videoInterval=setInterval(videoStatus,10); > > > > ns["onMetaData"]=function(obj){ > >duration=obj.duration; > > } > > function videoStatus(){ > >trace(movie_flv.playheadTime) ///trace undefined > >} > > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
If you're using a NetStream object, then I believe you want ns.time, not playheadTime. Helen natalia Vikhtinskaya wrote: Sorry, maybe I do something wrong but I can not get playheadTime var movie_flv:mx.controls.MediaDisplay; var nc:NetConnection=new NetConnection(); nc.connect(null); var ns:NetStream=new NetStream(nc); ns.setBufferTime(3); ns.onStatus=function(info){ if (info.code=="NetStream.Buffer.Full"){ bufferClip._visible=false; } if (info.code=="NetStream.BufferEmpty"){ bufferClip._visible=true; } if (info.code=="NetStream.Play.Stop"){ //this place not always works/ So when video finished ns.seek(0); } } theVideo.attachVideo(ns); ns.play("video/shoeshdmaster_vp6520.flv"); var videoInterval=setInterval(videoStatus,10); ns["onMetaData"]=function(obj){ duration=obj.duration; } function videoStatus(){ trace(movie_flv.playheadTime) ///trace undefined } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Sorry, maybe I do something wrong but I can not get PlayHead Time var movie_flv:mx.controls.MediaDisplay; var nc:NetConnection=new NetConnection(); nc.connect(null); var ns:NetStream=new NetStream(nc); ns.setBufferTime(3); ns.onStatus=function(info){ if (info.code=="NetStream.Buffer.Full "){ bufferClip._visible=false; } if (info.code=="NetStream.BufferEmpty"){ bufferClip._visible=true; } if (info.code=="NetStream.Play.Stop"){ //this place not always works. So for some video //it just stops at the end. I want it goes to the //start position and paused. ns.seek(0); } } theVideo.attachVideo(ns); ns.play("video/shoeshdmaster_vp6520.flv"); var videoInterval=setInterval(videoStatus,10); ns["onMetaData"]=function(obj){ duration=obj.duration; } function videoStatus(){ trace(movie_flv.playheadTime) //show undefined } 2007/1/18, Muzak <[EMAIL PROTECTED]>: Flash 8 has a new (and improved) Video component mx.controls.MediaDisplay no longer exists in Flash 8 and is replaced with mx.video.FLVPlayback http://livedocs.macromedia.com/flash/8/main/3477.html FLVPlayback component has a "complete" event: http://livedocs.macromedia.com/flash/8/main/3537.html regards, Muzak - Original Message - From: "Karina Steffens" <[EMAIL PROTECTED] > To: "'Flashcoders mailing list'" Sent: Thursday, January 18, 2007 1:23 PM Subject: RE: [Flashcoders] how to know that thae video is finished? > Isn't it amazing that Adobe/MM never bothered setting up a simple > onStopMovie event?... > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Sorry, maybe I do something wrong but I can not get playheadTime var movie_flv:mx.controls.MediaDisplay; var nc:NetConnection=new NetConnection(); nc.connect(null); var ns:NetStream=new NetStream(nc); ns.setBufferTime(3); ns.onStatus=function(info){ if (info.code=="NetStream.Buffer.Full"){ bufferClip._visible=false; } if (info.code=="NetStream.BufferEmpty"){ bufferClip._visible=true; } if (info.code=="NetStream.Play.Stop"){ //this place not always works/ So when video finished ns.seek(0); } } theVideo.attachVideo(ns); ns.play("video/shoeshdmaster_vp6520.flv"); var videoInterval=setInterval(videoStatus,10); ns["onMetaData"]=function(obj){ duration=obj.duration; } function videoStatus(){ trace(movie_flv.playheadTime) ///trace undefined } 2007/1/18, Karina Steffens <[EMAIL PROTECTED]>: Privyet Natasha, Here's how I solved it: Private var movie_flv:mx.controls.MediaDisplay; private var t:Number; private var lastCheck:Number; Private var play_btn //ToggleButton Private function checkStatus(){ if (play_btn.selected && movie_flv.playheadTime && movie_flv.playheadTime == lastCheck){ stopMovie() }else{ lastCheck = movie_flv.playheadTime; } } public function stopMovie(){ //This is where you execute you stop movie code, sent from checkStatus or remotely clearInterval(t) play_btn.selected = false; movie_flv.stop() lastCheck = 0; //Etc... } //And when you start playing: t = setInterval(this, "checkStatus", 2000) -- And of course, this code can modified to suit your needs. You can also replace the setInterval with onEnterFrame=checkStatus; and delete enterFrame; in the stopMovie() handler or equivalent. The play_btn in my code refers to a custom ToggleButton that switches between playing(selected) and paused(deselected) states. You might still be able to use that check with a different toggle button control, or alternatively, set a flag variable to check if the movie is currently paused. Hope this helps, Karina > -Original Message- > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 10:00 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Thank you very much for help. I used this for two different > flv videos.Ichecked status for both: > For one I have this trace > > NetStream.Play.Start > > NetStream.Buffer.Full > > NetStream.Buffer.Flush > NetStream.Buffer.Empty > > and for another > > NetStream.Play.Start > > NetStream.Buffer.Full > > NetStream.Buffer.Flush > > NetStream.Play.Stop > > > > I am not big expert in video. Can anybody explain why one > video has status NetStream.Play.Stop and another not? And how > to write script that find that video is finished for any video. > > > > 2007/1/18, Matthias Dittgen <[EMAIL PROTECTED]>: > > > > use this: > > > > myNetStream.onStatus = function(infoObject:Object):Void { > >if (debug==true) > >{ > >status_txt.text += "status (" + this.time + " seconds)\n"; > >status_txt.text += "\t Level: " + infoObject.level + "\n"; > >status_txt.text += "\t Code: " + infoObject.code + "\n\n"; > >} > >if (infoObject.code=="NetStream.Play.Stop") > >{ > >// VIDEO FINISHED.. > >// use some Delegate.create(...) here > >} > > } > > > > HTH, > > Matthias > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > _
RE: [Flashcoders] how to know that thae video is finished?
Hi Muzak, Sounds like this new component might be a better option for Natalia's problem. Karina > -Original Message- > From: Muzak [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 12:43 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Flash 8 has a new (and improved) Video component > mx.controls.MediaDisplay no longer exists in Flash 8 and is > replaced with mx.video.FLVPlayback > http://livedocs.macromedia.com/flash/8/main/3477.html > > FLVPlayback component has a "complete" event: > http://livedocs.macromedia.com/flash/8/main/3537.html > > regards, > Muzak > > - Original Message - > From: "Karina Steffens" <[EMAIL PROTECTED]> > To: "'Flashcoders mailing list'" > Sent: Thursday, January 18, 2007 1:23 PM > Subject: RE: [Flashcoders] how to know that thae video is finished? > > > > Isn't it amazing that Adobe/MM never bothered setting up a simple > > onStopMovie event?... > > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished? using FLVPlayback
The MediaPlayback components do still exist -- they're just listed in the Flash 6-7 folder in the components window. I wanted to use FLVPlayback for a recent video project but I can't get it to display the streamed videos that are working fine with the MediaPlayback component. For the latter, I use setMedia("rtmp:/LT/myfile.flv") but there is no setMedia command for FLVPlayback, only contentPath, and setting it to the above doesn't work, nor did setting contentPath = "rtmp:///LT/myfile.flv" or "rtmp://address>/LT/stream/_definst_/myfile.flv" -- any suggestions? Helen Muzak wrote: Flash 8 has a new (and improved) Video component mx.controls.MediaDisplay no longer exists in Flash 8 and is replaced with mx.video.FLVPlayback http://livedocs.macromedia.com/flash/8/main/3477.html FLVPlayback component has a "complete" event: http://livedocs.macromedia.com/flash/8/main/3537.html regards, Muzak - Original Message - From: "Karina Steffens" <[EMAIL PROTECTED]> To: "'Flashcoders mailing list'" Sent: Thursday, January 18, 2007 1:23 PM Subject: RE: [Flashcoders] how to know that thae video is finished? Isn't it amazing that Adobe/MM never bothered setting up a simple onStopMovie event?... ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Flash 8 has a new (and improved) Video component mx.controls.MediaDisplay no longer exists in Flash 8 and is replaced with mx.video.FLVPlayback http://livedocs.macromedia.com/flash/8/main/3477.html FLVPlayback component has a "complete" event: http://livedocs.macromedia.com/flash/8/main/3537.html regards, Muzak - Original Message - From: "Karina Steffens" <[EMAIL PROTECTED]> To: "'Flashcoders mailing list'" Sent: Thursday, January 18, 2007 1:23 PM Subject: RE: [Flashcoders] how to know that thae video is finished? > Isn't it amazing that Adobe/MM never bothered setting up a simple > onStopMovie event?... > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] how to know that thae video is finished?
Isn't it amazing that Adobe/MM never bothered setting up a simple onStopMovie event?... > -Original Message- > From: Hans Wichman [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 12:12 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Hi, > the video might not be correctly encoded, ie from meta data > etc. And I think that in some player version (might still be > the case), the stop is triggered before the buffer empty. In > other words if you have a buffer set to 5 seconds, the video > will play on for 5 seconds after receiving a stop signal. > > In the end we preprocessed all our vids with a > metadatainjector such as burak's and check the time against > the duration. > > greetz > JC > > > > On 1/18/07, Karina Steffens <[EMAIL PROTECTED]> wrote: > > > > > > Privyet Natasha, > > > > Here's how I solved it: > > > > Private var movie_flv:mx.controls.MediaDisplay; > > private var t:Number; > > private var lastCheck:Number; > > Private var play_btn //ToggleButton > > > > > > Private function checkStatus(){ > >if (play_btn.selected && movie_flv.playheadTime && > > movie_flv.playheadTime == lastCheck){ > >stopMovie() > >}else{ > >lastCheck = movie_flv.playheadTime; > >} > > } > > > > public function stopMovie(){ > >//This is where you execute you stop movie code, sent from > > checkStatus or remotely > >clearInterval(t) > >play_btn.selected = false; > >movie_flv.stop() > >lastCheck = 0; > > //Etc... > > } > > > > //And when you start playing: > > t = setInterval(this, "checkStatus", 2000) > > > > > > -- > > > > > > And of course, this code can modified to suit your needs. You can > > also replace the setInterval with onEnterFrame=checkStatus; and > > delete enterFrame; in the stopMovie() handler or equivalent. The > > play_btn in my code refers to a custom ToggleButton that switches > > between > > playing(selected) and paused(deselected) states. You might still be > > able to use that check with a different toggle button control, or > > alternatively, set a flag variable to check if the movie is > currently > > paused. > > > > Hope this helps, > > > > Karina > > > > > > > > > > > > > -Original Message- > > > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > > > Sent: 18 January 2007 10:00 > > > To: Flashcoders mailing list > > > Subject: Re: [Flashcoders] how to know that thae video is > finished? > > > > > > Thank you very much for help. I used this for two different flv > > > videos.Ichecked status for both: > > > For one I have this trace > > > > > > NetStream.Play.Start > > > > > > NetStream.Buffer.Full > > > > > > NetStream.Buffer.Flush > > > NetStream.Buffer.Empty > > > > > > and for another > > > > > > NetStream.Play.Start > > > > > > NetStream.Buffer.Full > > > > > > NetStream.Buffer.Flush > > > > > > NetStream.Play.Stop > > > > > > > > > > > > I am not big expert in video. Can anybody explain why one > video has > > > status NetStream.Play.Stop and another not? And how to > write script > > > that find that video is finished for any video. > > > > > > > > > > > > 2007/1/18, Matthias Dittgen <[EMAIL PROTECTED]>: > > > > > > > > use this: > > > > > > > > myNetStream.onStatus = function(infoObject:Object):Void { > > > >if (debug==true) > > > >{ > > > >status_txt.text += "status (" + this.time + " > seconds)\n"; > > > >status_txt.text += "\t Level: " + > infoObject.level + "\n"; > > > >status_txt.text += "\t Code: " + infoObject.code > + "\n\n"; > > > >} > > > >if (infoObject.code=="NetStream.Play.Stop") > > > >{ > > > >// VIDEO FINISHED.. > > > >// use some Delegate.create(...) here > > > >} > > > > } > > > > >
Re: [Flashcoders] how to know that thae video is finished?
Hi, the video might not be correctly encoded, ie from meta data etc. And I think that in some player version (might still be the case), the stop is triggered before the buffer empty. In other words if you have a buffer set to 5 seconds, the video will play on for 5 seconds after receiving a stop signal. In the end we preprocessed all our vids with a metadatainjector such as burak's and check the time against the duration. greetz JC On 1/18/07, Karina Steffens <[EMAIL PROTECTED]> wrote: Privyet Natasha, Here's how I solved it: Private var movie_flv:mx.controls.MediaDisplay; private var t:Number; private var lastCheck:Number; Private var play_btn //ToggleButton Private function checkStatus(){ if (play_btn.selected && movie_flv.playheadTime && movie_flv.playheadTime == lastCheck){ stopMovie() }else{ lastCheck = movie_flv.playheadTime; } } public function stopMovie(){ //This is where you execute you stop movie code, sent from checkStatus or remotely clearInterval(t) play_btn.selected = false; movie_flv.stop() lastCheck = 0; //Etc... } //And when you start playing: t = setInterval(this, "checkStatus", 2000) -- And of course, this code can modified to suit your needs. You can also replace the setInterval with onEnterFrame=checkStatus; and delete enterFrame; in the stopMovie() handler or equivalent. The play_btn in my code refers to a custom ToggleButton that switches between playing(selected) and paused(deselected) states. You might still be able to use that check with a different toggle button control, or alternatively, set a flag variable to check if the movie is currently paused. Hope this helps, Karina > -Original Message- > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 10:00 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Thank you very much for help. I used this for two different > flv videos.Ichecked status for both: > For one I have this trace > > NetStream.Play.Start > > NetStream.Buffer.Full > > NetStream.Buffer.Flush > NetStream.Buffer.Empty > > and for another > > NetStream.Play.Start > > NetStream.Buffer.Full > > NetStream.Buffer.Flush > > NetStream.Play.Stop > > > > I am not big expert in video. Can anybody explain why one > video has status NetStream.Play.Stop and another not? And how > to write script that find that video is finished for any video. > > > > 2007/1/18, Matthias Dittgen <[EMAIL PROTECTED]>: > > > > use this: > > > > myNetStream.onStatus = function(infoObject:Object):Void { > >if (debug==true) > >{ > >status_txt.text += "status (" + this.time + " seconds)\n"; > >status_txt.text += "\t Level: " + infoObject.level + "\n"; > >status_txt.text += "\t Code: " + infoObject.code + "\n\n"; > >} > >if (infoObject.code=="NetStream.Play.Stop") > >{ > >// VIDEO FINISHED.. > >// use some Delegate.create(...) here > >} > > } > > > > HTH, > > Matthias > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] how to know that thae video is finished?
Privyet Natasha, Here's how I solved it: Private var movie_flv:mx.controls.MediaDisplay; private var t:Number; private var lastCheck:Number; Private var play_btn //ToggleButton Private function checkStatus(){ if (play_btn.selected && movie_flv.playheadTime && movie_flv.playheadTime == lastCheck){ stopMovie() }else{ lastCheck = movie_flv.playheadTime; } } public function stopMovie(){ //This is where you execute you stop movie code, sent from checkStatus or remotely clearInterval(t) play_btn.selected = false; movie_flv.stop() lastCheck = 0; //Etc... } //And when you start playing: t = setInterval(this, "checkStatus", 2000) -- And of course, this code can modified to suit your needs. You can also replace the setInterval with onEnterFrame=checkStatus; and delete enterFrame; in the stopMovie() handler or equivalent. The play_btn in my code refers to a custom ToggleButton that switches between playing(selected) and paused(deselected) states. You might still be able to use that check with a different toggle button control, or alternatively, set a flag variable to check if the movie is currently paused. Hope this helps, Karina > -Original Message- > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > Sent: 18 January 2007 10:00 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] how to know that thae video is finished? > > Thank you very much for help. I used this for two different > flv videos.Ichecked status for both: > For one I have this trace > > NetStream.Play.Start > > NetStream.Buffer.Full > > NetStream.Buffer.Flush > NetStream.Buffer.Empty > > and for another > > NetStream.Play.Start > > NetStream.Buffer.Full > > NetStream.Buffer.Flush > > NetStream.Play.Stop > > > > I am not big expert in video. Can anybody explain why one > video has status NetStream.Play.Stop and another not? And how > to write script that find that video is finished for any video. > > > > 2007/1/18, Matthias Dittgen <[EMAIL PROTECTED]>: > > > > use this: > > > > myNetStream.onStatus = function(infoObject:Object):Void { > >if (debug==true) > >{ > >status_txt.text += "status (" + this.time + " seconds)\n"; > >status_txt.text += "\t Level: " + infoObject.level + "\n"; > >status_txt.text += "\t Code: " + infoObject.code + "\n\n"; > >} > >if (infoObject.code=="NetStream.Play.Stop") > >{ > >// VIDEO FINISHED.. > >// use some Delegate.create(...) here > >} > > } > > > > HTH, > > Matthias > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
Thank you very much for help. I used this for two different flv videos.Ichecked status for both: For one I have this trace NetStream.Play.Start NetStream.Buffer.Full NetStream.Buffer.Flush NetStream.Buffer.Empty and for another NetStream.Play.Start NetStream.Buffer.Full NetStream.Buffer.Flush NetStream.Play.Stop I am not big expert in video. Can anybody explain why one video has status NetStream.Play.Stop and another not? And how to write script that find that video is finished for any video. 2007/1/18, Matthias Dittgen <[EMAIL PROTECTED]>: use this: myNetStream.onStatus = function(infoObject:Object):Void { if (debug==true) { status_txt.text += "status (" + this.time + " seconds)\n"; status_txt.text += "\t Level: " + infoObject.level + "\n"; status_txt.text += "\t Code: " + infoObject.code + "\n\n"; } if (infoObject.code=="NetStream.Play.Stop") { // VIDEO FINISHED.. // use some Delegate.create(...) here } } HTH, Matthias ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
use this: myNetStream.onStatus = function(infoObject:Object):Void { if (debug==true) { status_txt.text += "status (" + this.time + " seconds)\n"; status_txt.text += "\t Level: " + infoObject.level + "\n"; status_txt.text += "\t Code: " + infoObject.code + "\n\n"; } if (infoObject.code=="NetStream.Play.Stop") { // VIDEO FINISHED.. // use some Delegate.create(...) here } } HTH, Matthias ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
I look through the help file but didn't find onComplete event. What I always use is onStatus NetStream.Play.Stop. On 1/18/07, Jordan Snyder <[EMAIL PROTECTED]> wrote: The onMetaData event is fired in the beginning of the clip if there is metadata. Using similar code, look at the onComplete event of the NetStream class. cheers On 1/17/07, natalia Vikhtinskaya <[EMAIL PROTECTED]> wrote: > Hi to all > How to determine that the video is finished? > I tried > ns["onMetaData"]=function(obj){ > duration=obj.duration; > } > and then > if(ns.time==duration) > > but it is always false. > Thank you for any help. > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > -- Jordan Snyder Applications Developer Image Action LLC http://www.imageaction.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- /* Bored, sometimes. */ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to know that thae video is finished?
The onMetaData event is fired in the beginning of the clip if there is metadata. Using similar code, look at the onComplete event of the NetStream class. cheers On 1/17/07, natalia Vikhtinskaya <[EMAIL PROTECTED]> wrote: Hi to all How to determine that the video is finished? I tried ns["onMetaData"]=function(obj){ duration=obj.duration; } and then if(ns.time==duration) but it is always false. Thank you for any help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Jordan Snyder Applications Developer Image Action LLC http://www.imageaction.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] how to know that thae video is finished?
Hi to all How to determine that the video is finished? I tried ns["onMetaData"]=function(obj){ duration=obj.duration; } and then if(ns.time==duration) but it is always false. Thank you for any help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com