I have been trying for a few days now to scroll a text field that is based on a xml document. The scrolling seems to work fine when the text field is populated from a variable, but it does not work from xml. I receive no erros of any kind so I'm clueless of what is actually happening can you please help? Thanks Webguy
Please post more details about a problem when requesting help or information (code blocks, etc). What have you read that has been either helpful or confusing?
The advantage in parsing it would be to display only the elements of the XML file you want to display and to format it so it looks all nice and pretty.
Grab the flash slashdot news reader. Believe it is on flashkit so you can take a look at how it parses the slashdot xml file and formats it to look all nice. It even has a useful working scrollbar too.
[QUOTE]Originally posted by Hythian
[B]The advantage in parsing it would be to display only the elements of the XML file you want to display and to format it so it looks all nice and pretty.
Grab the flash slashdot news reader. Believe it is on flashkit so you can take a look at how it parses the slashdot xml file and formats it to look all nice. It even has a useful working scrollbar too.
-Hythian
QUOTE]
Thanks.. I put a search on for the "flash slashdot news reader" and I could not find it. Do you know where it is. Thanks for your help.
I see the parse fuction but hoe do I actually parse the xml code. The online help on the parse function is not very useful. Can anyone give me an example on parsing. ALso does the format of the xml file matters when it comes to parsing? For example an xml file file that has multiple elements as opposed to one without out any.
The stand-alone slashdot news reader there is the Flash5 xml application I was talking about. A simple little piece of code where it loads an xml file, displays it on screen, and has a scrollbar for you to scroll the display with.
XML.load(url) loads a file external to the movie and parses the file for you.
XML.parseXML(source) takes a source variable or string and parses that for you.
Back to your original question of why the scrolling doesn't work with the XML object being sent to the text field is because you need to populate the text field with a string, and not an XML object. So use XML.toString() to get a string representation of the XML object, and send that to the text field.