Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Lyrics from XML

Community Beginner ,
Dec 12, 2007 Dec 12, 2007
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 😛 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.
TOPICS
ActionScript
676
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 13, 2007 Dec 13, 2007
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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 14, 2007 Dec 14, 2007
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".
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2007 Dec 14, 2007
Hi lol yep there are, sorry i forgot to update the post 😛 i copied this from another forum that i posted in and noone has replied.. yeh, check first post for all my code update. Thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2007 Dec 14, 2007
Hi lol yep there are, sorry i forgot to update the post 😛 i copied this from another forum that i posted in and noone has replied.. yeh, check first post for all my code update. Thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 14, 2007 Dec 14, 2007
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!


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2007 Dec 14, 2007
LATEST
Wow man!!! THAT ACTUALLY FRIGGIN 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!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines