I have a quiz game in Flash that pulls questions from .xml files. The questions are in this format:
> <q>A book of maps</q>
> <a>Atlas</a>
I’ve noticed I can’t put quotes or apostrophes in it. If I do it doesn’t display them, it shows " or '
Someone suggested actually putting in " instead, but that just came out the same way. Any ideas of why it would do that or a way around it? Thanks for any help.
for the quote (only), you must escape it. and that should be
"
no
"
function str_replace(str){
return str.split(""").join("\"");
}
that can be placed anywhere as long as it executes before it's called (which it will be if it's attached to the same frame where you load the text).
Where does this output (Put the "text"in here) get displayed? In the Output window, in a formatted text field?
What happens when you trace out the xml object that loaded the xml file? The code would be something like trace(myXMLObject.q), depending on the name of your xml object and the structure of the xml file.
North America
Europe, Middle East and Africa
Asia Pacific