A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: F8 AS2 xml video player

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    23

    F8 AS2 xml video player

    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
    Last edited by sinisav; 02-18-2009 at 06:21 PM.

  2. #2
    Junior Member
    Join Date
    May 2008
    Posts
    23
    Quote 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();}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center