
here is my code (that relates to this) so far….
public class playlist_controller extends MovieClip {
private var xml_loader:URLLoader;
public function playlist_controller():void {
////load the xml file
xml_loader = new URLLoader();
xml_loader.addEventListener(Event.COMPLETE, start_video);
xml_loader.load(new URLRequest("List1.xml"));
////tilelist component
tile_list.setSize(700,1200);
tile_list.columnWidth=340;
tile_list.rowHeight=110;
tile_list.direction=ScrollBarDirection.VERTICAL;
tile_list.setStyle("cellRenderer", image_details);
tile_list.setStyle("contentPadding", 10);
}
public function start_video(event:Event):void {
var lets_load_xml:XML=new XML(xml_loader.data);
var tile_list_details:XML;
////populate the playlist
for each (tile_list_details in lets_load_xml.Recent.vidz) {
////images values (in xml) and assign each one to its own cell in the tilelist
var load_images:String;
if (tile_list_details.hasOwnProperty("@load_images")> 0) {
load_images=tile_list_details.@load_images;
}
tile_list.addItem({label:tile_list_details.attribu te("text_placement_intileList").toXMLString(), data:tile_list_details.attribute("streaming_link") .toXMLString(), source:load_images});
}
newsroomList.addEventListener(MouseEvent.CLICK, newsroomList_select);
function newsroomList_select(event:Event):void {
for each (tile_list_details in lets_load_xml.Newsroom.vidz) {
////images values (in xml) and assign each one to its own cell in the tilelist
var load_images:String;
if (tile_list_details.hasOwnProperty("@load_images")> 0) {
load_images=tile_list_details.@load_images;
}
tile_list.addItem({label:tile_list_details.attribu te("text_placement_intileList").toXMLString(), data:tile_list_details.attribute("streaming_link") .toXMLString(), source:load_images});
}
}
If you would like to make a comment, please fill out the form below.
Recent Comments