FORUMS: list search recent posts

Adding Thumbnails to the FLV XML playlist

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
N8tracks
Adding Thumbnails to the FLV XML playlist
on Jan 16, 2007 at 5:19:28 am

I have set up an flv player that plays via xml both sequentially and randomly. The listbox currently contains the "names" of the flv files contained in the xml playlist. I have a folder set up in my directory called /thumbs and /videos and an xml file called videos.xml.

I would like to add thumbnails for each video using an 80x60 jpeg and have it next to the name of the flv inside the listbox.

Is this possible and if not whats the better method? If so what code changes should I make?


Action script



var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0;i list.addItem(nodes[i].attributes.desc,nodes[i].attributes.flv);
}
vid.play(list.getItemAt(0).data);
list.selectedIndex = 0;
}

xml.load("videos.xml");

var lList:Object = new Object();
lList.change = function() {
vid.play(list.getItemAt(list.selectedIndex).data);
count = list.selectedIndex;
}

list.addEventListener("change",lList);

var vidList:Object = new Object();

var count:Number = 0;

vidList.complete = function() {
if(seq.selected) {
if(count == list.length-1) {
count = 0;
}
else {
count++;
}
}
else {
var temp = count;
while(temp == count) {
count = Math.floor(Math.random()*list.length);
}
}
vid.play(list.getItemAt(count).data);
list.selectedIndex = count;
}

vid.addEventListener("complete",vidList);stop();


XML

?xml version="1.0" encoding="iso-8859-1"?>
playlist>
video desc="Hope In Slow Motion" flv="http://www.riverfrontradio.com/videos/hism-626.flv"/>
video desc="The Intro" flv="http://www.riverfrontradio.com/videos/lojic_the_intro.flv"/>
/playlist>


Return to posts index

Sher Ali
Re: Adding Thumbnails to the FLV XML playlist
on Jan 16, 2007 at 5:54:23 am

gotoandlearn.com has video tutorial titled "XML Video Playlist" which explains how to add thumbnails to the listbox.


------------
Sher Ali
http://www.webeyestudio.com


Return to posts index

N8tracks
Re: Adding Thumbnails to the FLV XML playlist
on Jan 16, 2007 at 6:31:24 am

I am very familar with that site. I visited it today infact. I see many tutorials, I see one on xml playlists, I see one on thumbnails but i donot see one on adding thumbnails to the xml playlists.


Return to posts index


Sher Ali
Re: Adding Thumbnails to the FLV XML playlist
on Jan 16, 2007 at 6:47:40 am

Here is the code snippet for adding thumbnails to the list component provided by Lee on his blog (theflashblog.com)

tl.iconFunction = function(item) {
if(item.data.indexOf("aftereffects")!=-1) return "ae";
if(item.data.indexOf("flash")!=-1) return "flashIcon";

if(item.data.indexOf("swift")!=-1) return "swiftIcon";

if(item.data.indexOf("photoshop")!=-1) return "photoshopIcon";

}

where

ae
flashIcon
swiftIcon
photoshopIcon

are linkage identifiers for the respective software icons movieclips in the library.


-----------------
Sher Ali
http://www.webeyestudio.com


Return to posts index

N8tracks
Re: Adding Thumbnails to the FLV XML playlist
on Jan 16, 2007 at 7:15:23 am

I love this site!


Return to posts index

lajoiet
Re: Adding Thumbnails to the FLV XML playlist
on Jan 17, 2007 at 1:21:55 am

This might be what you're looking for, The last post on this page....

http://www.gotoandlearn.com/forum/viewtopic.php?t=3941

>Todd
_____________________________________

I'm filling a need. Without me there would be no bad examples.
_____________________________________


Return to posts index


N8tracks
Re: Adding Thumbnails to the FLV XML playlist
on Jan 17, 2007 at 10:59:06 am

This is exactly what I needed. Like I said, I love this site. Long live the Cow!

Thank you so much!
N8


Return to posts index

Nicole Muller
Re: Adding Thumbnails to the FLV XML playlist
on Sep 16, 2008 at 8:04:54 pm

Unfortunately the link was dead, could you please repost a working one? thanks



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]