6 Replies Latest reply on Dec 14, 2007 12:20 PM by Woodpeckersam

    Lyrics from XML

    Woodpeckersam
      Hi there people how ya doing?

      I am in need of a bit of help here.. i have asked on other forums for this sort of help, but noone seems to care or help.. and hope they can here :).

      What i need is where a song is loaded, load lyrics into a text box.

      Where you see the ///////////////// on the first code is the text box i want to load the lyrics..
      problem is, when i try to load it.. it actually comes up with "Lyrics/FFRazor.txt" can someone help me figure out how to make this work.

      The second code is the XML

      The third code is the external class called "Song.as"

      NOTE: earl actually means URL :P jus copied it from a tut.

      Please help :)

      thanks.

      ps. Here is what it looks like
      PIC OF MY MEDIA PLAYER
      Still thats not the final product, its defo not gonna have a white BG.
        • 1. Re: Lyrics from XML
          Woodpeckersam Level 1
          bump... please please help me.. I thought this was an extremely easy thing to do to someone who has more knowledge of XML or Text boxes than i have.. i guess i was wrong... sum1 tell me please.
          • 2. Re: Lyrics from XML
            yachts99-2vTvY1 Level 2
            Is there supposed to be a "lyric" attribute in your XML file? You seem to be pushing it's value in to the array named "sa".
            • 3. Re: Lyrics from XML
              Woodpeckersam Level 1
              Hi lol yep there are, sorry i forgot to update the post :P i copied this from another forum that i posted in and noone has replied.. yeh, check first post for all my code update. Thanks
              • 4. Re: Lyrics from XML
                Woodpeckersam Level 1
                Hi lol yep there are, sorry i forgot to update the post :P i copied this from another forum that i posted in and noone has replied.. yeh, check first post for all my code update. Thanks
                • 5. Re: Lyrics from XML
                  yachts99-2vTvY1 Level 2
                  Your application is actually working correctly, not just how you want it to!

                  What's happening is you are trying to populate the lyrics text field with the text contained in the external file, but your xml attribute contains the ADDRESS of the file, not the CONTENTS of that file. The address of the file is being displayed.

                  You need to load the contents of the file each time you loop in your playsong() function. Here is a new version of that function below. I haven't tested it but if it doesn't work hopefully there is enough of a pointer for you to try a different direction!


                  • 6. Re: Lyrics from XML
                    Woodpeckersam Level 1
                    Wow man!!! THAT ACTUALLY ******* WORKS!! Dude thank you sooooo much!! I've been looking for so long.. damn i think I have to credit you for this, even if this doesnt go commercial its a college project.. thnx you soo much. Only problem now is that the text spacing is kinda gapped, but i'll find a workaround. cheers man!

                    I fiddled with the text a bit it works fab! now thank thank thank you!