Yes I am stupid and I should have checked all the Devcenter articles first... It was only when I finished this little tutorial that I realized that Lisa Larson had already covered this ground. I used her Flashcom Server based article as a starting point to turn it into a progressive download and then found out that she had already taken care of it. Ah well, I think I still had some value to add. In particular, my list will not download all flv's in the background but shows a preview and then stops the download as outlined in my tip here. No jpg thumbnails are needed from here on.
Check the video tutorial: yet another flv listbox

#1 by brent arnold on 10/24/05 - 9:38 PM
what do you think? is this possible? And I am using PHP with the FLVPlayback component.
Well thanks for writing this article, it is very timely.
#2 by stoem on 10/25/05 - 9:13 AM
FYI I will shortly release an updated version of this sample app which uses Flash8's bitmapdata api to create the thumbnail in an alternative and possibly more robust way.
#3 by brent arnold on 10/25/05 - 2:40 PM
Well thanks again and i look forward to your update.
#4 by stoem on 10/25/05 - 2:47 PM
This may be an issue but may also be workable. Not sure. For my needs the thumbs do the job.
#5 by Steve on 2/5/06 - 3:22 PM
Steve
#6 by stoem on 2/6/06 - 8:55 AM
#7 by Dave on 9/8/06 - 10:49 AM
V.interested by your idea Stefan, as have been using Lisa's tut as a template for my own project and was beginning to think that using FFMPEG server-side would be the only way to generate dynamic thumbnails.
I just downloaded the source however, and the swf crashes my machine.. without fail.
Looking at my menumeters, my processor floods and I get beachballed and have to force-quit.
Anyone else suffered this? perhaps some mods are in order?
Will continue going through the code and search for an answer, thanks for sharing..
Dave
#8 by Stefan on 9/8/06 - 10:58 AM
#9 by Chad Courtney on 9/12/06 - 10:49 AM
#10 by kevin on 10/24/06 - 3:53 PM
thanks :)
#11 by Pete on 11/1/06 - 7:06 PM
#12 by Stefan on 11/1/06 - 7:20 PM
#13 by adam on 12/11/06 - 11:44 PM
would it be possible to add a progress bar so after user clicks on a thumbnail it shows info of how much is buffered. it would be a nice feature, because now it just continue to show thumbnail in the video box while wating for the buffering to complete the preset amount of seconds. to user it may look like the player is not working.
i tried and couldn't make it work with this approach :
http://livedocs.macromedia.com/flash/8/main/wwhelp...
any ideas appreciated.
#14 by Jeevan K Augustin on 3/7/07 - 9:30 AM
thanks a lot for your published information. i have tried it. & it's working...good...
#15 by Joshua on 8/8/07 - 8:09 PM
#16 by Andrew K on 1/9/08 - 6:49 AM
This is a great article.
I was wondering could you use this list component with the FLV Playback component in flash 8 or CS3.
#17 by Stefan on 1/9/08 - 9:00 AM
#18 by Andrew K on 1/10/08 - 5:39 AM
I'm new to actionscript
#19 by Andreas on 2/15/08 - 8:34 AM
Like the FLV Playback Component it stops the video if you set it to autoPlay=false on frame 1. There must be a way of stopping the flv the same whay with this solution?
BR
/Andreas
#20 by Andreas on 2/15/08 - 8:36 AM
#21 by Stefan on 2/15/08 - 9:04 AM
#22 by Andreas on 2/15/08 - 9:55 AM
if (info.code== "NetStream.Play.Start"){
_ns.seek(0);
}
if (info.code=="NetStream.Seek.Notify"){
_ns.pause();
_nc.close();
}
Problem is that it still loads a few bytes more then the first frame. Why because imagine a page full with thumbnails if it has to load 10-40kb/thumbnail even if the first frame of the flv probably need alot less then that. there is no point in doing this instead of a real jpg thumbnail.
Im trying to figure out how I can get hold of how many bytes the first fram is anf the stop the loading with
"if(_ns.bytesLoaded>first frame) then "_ns.play("nonexist.flv");"
#23 by Andreas on 2/15/08 - 9:58 AM
/A
#24 by Andreas on 2/18/08 - 7:20 AM
Looks like the best whay to detect when the first frame is loaded is this (the important part):
var bLoadedTot = "FALSE";
this.onEnterFrame = function() {
//tracing the bytes loaded in a text variable
bLoaded = _ns.bytesLoaded;
trace("thumb.video.height="+thumb.video.height);
//if the video object is loaded its height turns to above zero
if (thumb.video.height>0) {
if (bLoadedTot == "FALSE") {
bLoadedTot = _ns.bytesLoaded;
_ns.pause();
_nc.close();
_ns.play("nonexist.flv");
delete this.onEnterFrame;
}
}
};