3 Replies Latest reply on May 10, 2007 9:06 PM by samuels2921

    flash varible

    samuels2921
      flashvars

      Hello im trying to build an mp3 player that reads the playlist from the flashvars code in the html. I've got the player to load the playlist with this code

      loadSongList("playlist.xml") ;

      My varible name is "var1" . I tried this code but it dosent work.

      loadsonglist = var1;

      this is my html code
      Code:
      --------------------------------------------------------------------------------


      param=flashvars value="var1=www.mysite.com/playlist.xml" />

      --------------------------------------------------------------------------------



      how do i set this up?
        • 1. Re: flash varible
          liquidleaf
          Make sure you have flashvars set in both the object and embed tags of the HTML code. It needs to be specified twice! In the embed code, it will look more like
          flashvars="var1=http://www.mysite.com/playlist.xml"

          You should probably add "http://" at the front of your URL, unless you are adding it later.
          • 2. Re: flash varible
            liquidleaf Level 1
            Also, your param tag is not formed correctly.

            It should be:

            <param name="flashvars" .... />
            • 3. flash varible
              samuels2921 Level 1
              how should the actionscript in flash be coded?

              loadsonglist (var1);
              loadsonglist = var1;

              also i forgot to mention the function code

              function loadSongList ( variable ) {
              //create new XML
              this.mySongList = new XML();
              this.mySongList.ignoreWhite = true;
              this.mySongList.load(URL);
              //callback function creates a playlist
              this.mySongList.myClip = this;
              //onLoad is referenced to the XML so first create a reference to self
              this.mySongList.onLoad = function() {
              // this now refers to the XML and myClip is used to pass the movieclip reference
              this.myClip.makePlayList(this);
              };
              }


              Is it coded right?I changed the bolded area from URL to variable, after trying it with URL.