Skip to main content
Jan 31, 2007 1:50 PM UTC
Question

Dynamic Playlist with jpg thumbs

Hi guys,

On the Dynamic Playlist the thumbnails are made by connecting to the video and getting the relevant frame.

I have over 40 videos in my collection and lots of traffic which would mean every client is connecting to 40 videos each time.

I would like to put in my own jpg image into the list instead of a video frame capture.

New to all this so any help would be appreciated.

This is what creates the frame capture

nc = new NetConnection();
nc.onStatus = function( info ) { trace( info.code ); }
nc.connect( url );

ns = new NetStream(nc);
ns.onStatus = function(info) {
if ( info.code == "NetStream.Play.Stop" ) {
nc = null;
ns = null;
}
}
thumb.video.attachVideo(ns);
ns.connect();
ns.play( stream, start, 0 );

but I would like to say thumb.image = "my_image.jpg"; or something.

Any ideas?
    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Feb 1, 2007 5:56 PM UTC
    Ideally, the images will reside outside of the .swf, and you'll load them at runtime. That way, you don't have to recompile your .swf every time you add/remove videos.

    See the Flash 8 docs about how to use the movieClip loader class, or check the general flash forum for discussions about it (I'm sure there are plenty).
    Translate
    Jan 31, 2007 4:41 PM UTC
    You can't load a jpg image through a netstream (or into a video object), so you'll need to use a moviecliploader instead.

    Inside the thumb movie clip, replace the video object with an empty movie clip (or create one a runtime with actionscript). Then replace all of the netconnection and netstream code with a movieClipLoader(), and target your movie clip in your moviecliploader.loadclip() arguments.
    Translate
    Feb 1, 2007 10:19 AM UTC
    Wow, Im a little lost there but I think I know what you are saying.

    Trouble is how would I do that?

    Lets see if I have it right, create a new movie clip symbol in the library that is simply the picture.
    Then load this in the VideoThumb.as.
    I might be completely wrong there as im a newbie to Flash.

    Would you have an example of the code to do that?

    Thanks
    Translate