1 Reply Latest reply on Apr 10, 2009 9:56 AM by kglad

    Multiple Component Questions VS Movie

    TheScarecrow Level 1

      I have an XML file that loads in to a flash movie (its a video player list)  THe XML file loads into a component list that displays

           MOVIE THUMB MOVIE NAME however I want to be able to group these items by the category in the XML file.  I am not sure how to do this.  Also, does anyone know a why to change the color of the list component, it appears as white and I cant change it.  Can a list be made int oa movie instead of a list component?  Here is the Actionscript that bulds the video list below.  Can anyone help? thanks?


      //Function that loads the XML file, parses it, and builds the list of available video clips
          var xmllist = new XML();          //setup a variable to hold the XML
          xmllist.ignoreWhite = true;
          xmllist.load( "videolistrss.xml" );     //load the XML file
          //The following gets called when the XML has been loaded
          xmllist.onLoad = function( status )  {
              if ( !status )
                  trace( status );
              var entries = this.childNodes[0];
              var playlists = {};
              var nav = [];
              for ( var i = 0; i < entries.childNodes.length; i++ ) {
                  var entry = entries.childNodes[i];
                  if ( entry.nodeName == "listitem" )
                      //builds array of video clip names
                      playlists[entry.attributes.name] = entry;
                  else if ( entry.nodeName == "menu" ) {
                      //builds array of available videos
                      for ( var j = 0; j < entry.childNodes.length; j++ )
                      nav[j] = playlists[entry.childNodes[j].attributes.name];
                  } //end else if
              } //end if


              //sends the array of videos to the listbox UI
              list.dataProvider = nav;
          } //end xmllist.onload




      Here is a sample of the XML file:
           <listitem name=" Introduction" url="rtmp://">
               <stream len="-1" name="Introduction" start="0"/>
                <category name="DVD"/>

                   <listitem name=" Introduction"/>


        • 1. Re: Multiple Component Questions VS Movie
          kglad Adobe Community Professional & MVP

          to group by category, build playlists first.  then when that's complete, iterate through the keys in playlists to build nav.


          to customize the list component, check the flash help files for information about customizing components or use google to search for a tutorial about skinning the list component.