mordocai
04-19-2005, 11:52 PM
Here is my setup
I have a media playback component on stage with the instance name of flPlayer
and i have a list box with the instance name of myList
And i have this code in the main timeline
listener = new Object ();
listener.change = function(evtObj){
var file = evtObj.target.selectedItem.data;
_root.flPlayer.contentPath = file;
};
myList.addEventListener("change", listener);
Now as you can see, whatever is selected in myList the data gets streamed to the playback component.... Now my question is could i use a tree instead of the list box? The XMl file for the tree would look like this:
<node label="Rock" value="1">
<node label="DeadStar">
<node label="Just Like You" value="http://audio.cdbaby.com/d/deadstar-03.mp3" />
<node label="Normal" value="http://audio.cdbaby.com/d/deadstar-04.mp3" />
<node label="Send Me An Angel" value="http://audio.cdbaby.com/d/deadstar-05.mp3" />
<node label="breathe For Me" value="http://audio.cdbaby.com/d/deadstar-06.mp3" />
<node label="Comes To Tounge" value="http://audio.cdbaby.com/d/deadstar-07.mp3" />
<node label="Your Freind" value="http://audio.cdbaby.com/d/deadstar-08.mp3" />
<node label="Therapy Scares Me" value="http://audio.cdbaby.com/d/deadstar-09.mp3" />
<node label="Deep Breath" value="http://audio.cdbaby.com/d/deadstar-11.mp3" />
<node label="Where The Beuty Ends" value="http://audio.cdbaby.com/d/deadstar-12.mp3" />
</node>
<node label="Metalica">
<node label="Whiskey In The Jar" value="http://www.xakep.ru/post/12306/metallica-whiskey_in_the_jar.mp3" />
<node label="Unforgiven2" value="http://www.xakep.ru/post/12304/metallica-unforgiven2.mp3" />
</node>
</node>
And its called playlist.xml...
I have the xml populated using an xml connector component, so populating the file should be of no worries.....
Thanks to whomever might help me solve this annoying little problem..
I have a media playback component on stage with the instance name of flPlayer
and i have a list box with the instance name of myList
And i have this code in the main timeline
listener = new Object ();
listener.change = function(evtObj){
var file = evtObj.target.selectedItem.data;
_root.flPlayer.contentPath = file;
};
myList.addEventListener("change", listener);
Now as you can see, whatever is selected in myList the data gets streamed to the playback component.... Now my question is could i use a tree instead of the list box? The XMl file for the tree would look like this:
<node label="Rock" value="1">
<node label="DeadStar">
<node label="Just Like You" value="http://audio.cdbaby.com/d/deadstar-03.mp3" />
<node label="Normal" value="http://audio.cdbaby.com/d/deadstar-04.mp3" />
<node label="Send Me An Angel" value="http://audio.cdbaby.com/d/deadstar-05.mp3" />
<node label="breathe For Me" value="http://audio.cdbaby.com/d/deadstar-06.mp3" />
<node label="Comes To Tounge" value="http://audio.cdbaby.com/d/deadstar-07.mp3" />
<node label="Your Freind" value="http://audio.cdbaby.com/d/deadstar-08.mp3" />
<node label="Therapy Scares Me" value="http://audio.cdbaby.com/d/deadstar-09.mp3" />
<node label="Deep Breath" value="http://audio.cdbaby.com/d/deadstar-11.mp3" />
<node label="Where The Beuty Ends" value="http://audio.cdbaby.com/d/deadstar-12.mp3" />
</node>
<node label="Metalica">
<node label="Whiskey In The Jar" value="http://www.xakep.ru/post/12306/metallica-whiskey_in_the_jar.mp3" />
<node label="Unforgiven2" value="http://www.xakep.ru/post/12304/metallica-unforgiven2.mp3" />
</node>
</node>
And its called playlist.xml...
I have the xml populated using an xml connector component, so populating the file should be of no worries.....
Thanks to whomever might help me solve this annoying little problem..