Originally Posted by
sinisav
I have xml video player. In the xml playlists i can different categories . Which video category i want to play i chose that from the drop down menu. Is there a way to somehow get the code so instead of dropdown menu in playlist for the playlist categories i would like to have two separate buttons for categories insted of drop down menu? Thanks
RESOLVED
I do not know if is the right way but it works for me just on each button i cahnge the path to xml file
Code:
on (release)
{//
// LOAD XML
//
loadXML = function (loaded) {
if (loaded) {
xmlNode = this.firstChild;
total = xmlNode.childNodes.length;
Name = [];
Thumb = [];
VideoClip = [];
Title = [];
Copy = [];
for (n=0; n<total; n++) {
// Get gallery name
Name[n] = xmlNode.childNodes[n].attributes.Name;
// Build gallery select menu
select_mc.selectBttn_mc.selectBttn.duplicateMovieClip("selectBttn"+n, n);
select_mc.selectBttn_mc["selectBttn"+n]._y = -select_mc.selectBttn_mc.selectBttn._height-(select_mc.selectBttn_mc.selectBttn._height)*n;
select_mc.selectBttn_mc["selectBttn"+n].txt_mc.txt.text = Name[n];
select_mc.selectBttn_mc["selectBttn"+n].ID = n;
select_mc.selectBttn_mc.selectBttn._visible = false;
}
buildGallery();
} else {
trace("Error loading XML");
}
};
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("content2.xml");
stop();}