# Multiple Choice Questions

**URL:** <https://forum.kirupa.com/t/multiple-choice-questions/25991>\
**Category:** flash\
**Created:** [July 18, 2003, 11:11am UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991 "2003-07-18T11:11:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jatin](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jatin](https://forum.kirupa.com/u/jatin)\
**Post date:** [July 18, 2003, 11:11am UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991/1 "2003-07-18T11:11:46Z")

</div>

Can somebody give me an example of Multiple Choice Questions, where the question are being fetched from a XML file.

👁

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 18, 2003, 11:27am UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991/2 "2003-07-18T11:27:48Z")

</div>

do you want to list all of the quesitons in the xml file?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 4:30am UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991/3 "2003-07-19T04:30:13Z")

</div>

hi e.s.x.s ,

that will also b fine. pls. tell me abt that. i will list all my questions in XML fine.

thnx for ur nice reply.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 11:23am UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991/4 "2003-07-19T11:23:01Z")

</div>

xml file content:

```php

<?xml version="1.0" encoding="UTF-8"?>
<dataroot>
<question>what is the matrix?</question>
<question>is it air u r beathing now?</question>
</dataroot>

```

xml file name: qst.xml  
[COLOR=blue]your swf and xml files are must be in the same directory![/COLOR]  
put the below code your first frame and create a dynamic textbox and [COLOR=red]set its var to “qst”[/COLOR]  
[AS]  
questions = new XML();  
questions.load(“qst.xml”);  
questions.ignoreWhite = true;  
questions.onLoad = function(success) {  
if (success) {  
for (i=0; i\<questions.firstChild.childNodes.length; i++) {  
\_root[“qstion”+i] = questions.firstChild.childNodes\*.firstChild.nodeValue;  
qst = qst+"\<br\>"+\_root[“qstion”+i];  
}  
}  
};  
stop();  
[/AS]  
this is a simple solution for your problem,but i hope it will help you…😉  
You can download FLA and XML file …

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 12:51pm UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991/5 "2003-07-19T12:51:00Z")

</div>

thnx a lot. now i m trying to add some more questions in that file and then i will call those question into my flash file randomely.

Thnx again for ur co-operation :)).

Bye and take care .(and also try to b in touch, my mail id is [jatin\_anand@hotmail.com](mailto:jatin_anand@hotmail.com))

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 1:55pm UTC](https://forum.kirupa.com/t/multiple-choice-questions/25991/6 "2003-07-19T13:55:11Z")

</div>

u r welcome jatin;) u can contact me with using my profile details:)

ßye…
