Hello! Okay. I am not too savvy with XML and Flash integration and am confused about a couple different things. What I am wanting to do is take an XML file, and randomly display a sentence in the flash. But these sentences have categories that they are in. For now we are going to call them Grades. Here is an example of the XML file called “book.xml”. I don’t know if this is the way to lay this out or not.
<?xml version="1.0"?>
<BOOK>
<SENTENCE TXT="Some random statement type sentence." GRADE="A" TYPE="S"></SENTENCE>
<SENTENCE TXT="Some random question type sentence?" GRADE="B" TYPE="Q"></SENTENCE>
<SENTENCE TXT="Some random statement type sentence." GRADE="C" TYPE="S"></SENTENCE>
<SENTENCE TXT="Some random question type sentence?" GRADE="D" TYPE="Q"></SENTENCE>
</BOOK>
</QUIZ>
What I want to do, is only display the the sentences that where var grade_a == 1 or grade_c == 1. For whichever grade they want to see.
Then they have two buttons. “Question” or “Statement”. If they click “Question” it only displays TYPE = “Q” of the whatever grades they want. If they click “Statement” it only displays the TYPE = “S” of whatever grades they have selected.
I am trying to get this to where only one random sentence displays each time they click one of the buttons.
Am I making any sense here? I don’t have any idea on how to do this. Any help or direction would be much appreciated
Thanks!