Skip to main content
January 31, 2007
Question

Dynamic Playlist with jpg thumbs

  • January 31, 2007
  • 2 replies
  • 298 views
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 has been closed for replies.

    2 replies

    February 1, 2007
    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).
    January 31, 2007
    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.
    February 1, 2007
    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