XML Data length

Wonder if someone can help, I’ve loaded in to my flash file a bit of text from an external XML document which displays in a text box nicely. What I now need is to be able to get the length of the string. Is this possible?

My initial thought was:[COLOR=Blue]

text_box.text = xml;[/COLOR]
[COLOR=Blue]trace(xml.length());

[COLOR=Black]However the trace box returns the value “1” which is assume is a boolean. Any ideas?[/COLOR]
[/COLOR]

http://dnadillo.dn.ua/fla/XML/img-xml.swf
http://dnadillo.dn.ua/fla/XML/mur_xml_file_img.xml

test text_box.text.length

yeah that did it, I actually tried that before but with length() which must have been the problem, thanks Alex

Wouldn’t trace(text_box.text.length); work?

You could also use something like xmlTextElement.toString().length if you wanted :slight_smile:

Ah yes, thanks for correcting that, amarghosh… still getting a little crossover knowledge from AS2 to AS3… still catches me out from time to time :slight_smile: