flash xml playlist

  • fmike13
  • Born
  • Born
  • No Avatar
  • Joined: 08 May 2008
  • Posts: 1
  • Status: Offline

Post May 8th, 2008, 8:31 am

I am new to flash and I have a questions that I think should be pretty simple but I can't seem to figure it out. I'm creating a flash page with an xml video player, and my actionscript works fine, but I would like to add thumbnails to the playlist. Can anyone help me with that. Below is the actionscript that I am using.


  1. import fl.video.FLVPlayback;
  2. var loader:URLLoader = new URLLoader();
  3. loader.addEventListener(Event.COMPLETE, onLoaded);
  4.  
  5. myList.addEventListener(Event.CHANGE, itemChange);
  6.  
  7. function itemChange(e:Event):void {
  8.     //myPlayer.load(myList.selectedItem.data);
  9.     myPlayer.play(""+myList.selectedItem.data);
  10. }
  11.  
  12. var xml:XML;
  13.  
  14. function onLoaded(e:Event):void {
  15.  
  16.     xml = new XML(e.target.data);
  17.     var il:XMLList = xml.channel.item;
  18.     for (var i:uint=0; i<il.length(); i++) {
  19.         myList.addItem({label:il.description.text()[i],
  20.         data:il.title.text()[i]});
  21.     }
  22. }
  23.  
  24. loader.load(new URLRequest("VideoPlayerData.xml"));
  25. myPlayer.addEventListener(Event.COMPLETE, nextFLV);
  26. function nextFLV(e:Event):void {
  27.  
  28.     var ds = myList.selectedIndex;
  29.     var dsl = myList.length;
  30.     if (myList.selectedIndex == 0) {
  31.         trace("if = yes: "+dsl);
  32.         myList.selectedIndex = (+1);
  33.         myPlayer.play(""+myList.selectedItem.data);
  34.     } else {
  35.         if ((ds+1) == dsl) {
  36.             myList.selectedIndex = 0;
  37.             myPlayer.play(""+myList.selectedItem.data);
  38.         } else {
  39.             trace("if = else");
  40.             myList.selectedIndex = (ds+1);
  41.             myPlayer.play(""+myList.selectedItem.data);
  42.         }
  43.     }
  44. }
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 8th, 2008, 8:31 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 19508
  • Loc: Pittsburgh PA
  • Status: Offline

Post May 8th, 2008, 10:24 am

I believe this is what you need

http://www.adobe.com/devnet/flash/artic ... ad_05.html

Thought it was rather funny. Your same question at Adobe forums is already indexed by Google as the first result. I found that Adobe link as a secondary link under your result. Check out what I mean
http://www.google.com/search?source=ig& ... gle+Search

It was almost as if Google was answering your question for you. Really kinda spooky. *lol

Post Information

  • Total Posts in this topic: 2 posts
  • Moderators: joebert, digitalMedia, UNFLUX
  • Users browsing this forum: No registered users and 31 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2008. Driven by phpBB © 2001-2008 phpBB Group.

 
 
 
 

Need a pre-made web design for your website?

Check out our templates here: Ozzu Templates


400+ FREE Website Templates. Download Now!