<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0">
<channel><title><![CDATA[ActionScript.org Flash, Flex and ActionScript Resources - Comments for article: Create a Quiz Application Using AS3 Classes]]></title><link>http://www.actionscript.org/resources</link><description /><language>en-us</language><copyright><![CDATA[http://www.actionscript.org/resources]]></copyright><generator>N/A</generator><webMaster>general.redirect@gmail.com</webMaster><lastBuildDate>Mon, 23 Nov 2009 05:16:14 CST</lastBuildDate><ttl>20</ttl><item><title><![CDATA[Comment #1]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment9497</link><description><![CDATA[I have been struggling for a while with getting a class to 'use' another class. Everything is either too complicated or lacks any content or practical sample. Mr Hall writes - and explains - very clearly and comprehensively; I did not 'get lost' at any stage doing this tutorial (and I generally loathe tutorials). I recommend this to anyone who is trying to get to grips with AS3 Classes.<br/><br/>
(Comment posted by Andrew at 5:06 am, Thu 14th Feb 2008)]]></description><author>no@spam.com (Andrew)</author><pubDate><![CDATA[Thu, 14 Feb 2008 05:06:55 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment9497</guid></item><item><title><![CDATA[Comment #2]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment10161</link><description><![CDATA[for anyone having trouble getting this tutorial working (getting bunch of errors), read this:

http://www.actionscript.org/forums/showthread.php3?t=158139

<br/><br/>
(Comment posted by rich at 4:44 pm, Wed 12th Mar 2008)]]></description><author>no@spam.com (rich)</author><pubDate><![CDATA[Wed, 12 Mar 2008 16:44:37 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment10161</guid></item><item><title><![CDATA[Comment #3]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment11987</link><description><![CDATA[This is realy excellent. Thanks a lot.<br/><br/>
(Comment posted by debasish at 2:10 pm, Tue 16th Sep 2008)]]></description><author>no@spam.com (debasish)</author><pubDate><![CDATA[Tue, 16 Sep 2008 14:10:16 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment11987</guid></item><item><title><![CDATA[Comment #4]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12140</link><description><![CDATA[This tutorial has been really helpful, did anybody tried incorporating XML to it?
Kindly let me know i want to create a dynamic template for multiple choice.<br/><br/>
(Comment posted by Priyanka at 6:26 am, Mon 20th Oct 2008)]]></description><author>no@spam.com (Priyanka)</author><pubDate><![CDATA[Mon, 20 Oct 2008 06:26:24 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12140</guid></item><item><title><![CDATA[Comment #5 (Reply to Comment #4)]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13092</link><description><![CDATA[I tried it using XML.
The structure of my XML file is -
<quiz>
  <mcquestion>
    <question>Katrina customizes gradients. She wants to store the gradients for future use. In which of the following panels can she store them?</question>
    <answer>1</answer>
    <choices>
      <choice>Swatches</choice>
      <choice>Info</choice>
      <choice>Behaviors</choice>
    </choices>
  </mcquestion>
  <mcquestion>
    <question>Which of the following commands will you use to remove overlapped portions of selected objects by the uppermost selected object?</question>
    <answer>1</answer>
    <choices>
      <choice>Modify > Combine Objects > Punch</choice>
      <choice>Modify > Combine Objects > Union</choice>
      <choice>Modify > Combine Objects > Crop</choice>
      <choice>Modify > Combine Objects > Intersect</choice>
    </choices>
  </mcquestion>
</quiz>

And the code to read this XML file named say quiz.xml is -
public function QuizApp():void{
			var url:String = "quiz.xml";
			var request:URLRequest = new URLRequest(url);
			var loader:URLLoader = new URLLoader();
			loader.addEventListener(Event.COMPLETE, process);
			loader.load(request);
		}
		
		private function process(e:Event):void{
			prepareQuestions(XML(e.target.data));
			createButtons();
            createStatusBox();
            addAllQuestions();
            hideAllQuestions();
            firstQuestion();
		}
		
		private function prepareQuestions(quiz:XML):void{
			var quizQuestion:QuizQuestion = null;
			var options:Array = null;
			quizQuestions = new Array();
			for(var outerIndex:uint = 0; outerIndex < quiz.mcquestion.length(); outerIndex++){
				options = new Array();
				for(var innerIndex:uint = 0; innerIndex < quiz.mcquestion[outerIndex].choices.choice.length(); innerIndex++){
					options.push(quiz.mcquestion[outerIndex].choices.choice[innerIndex]);
				}
				quizQuestion = new QuizQuestion(quiz.mcquestion[outerIndex].question, quiz.mcquestion[outerIndex].answer, options);
				quizQuestions.push(quizQuestion);
			}
		}

Hope it helps.<br/><br/>
(Comment posted by Lalit Bhatt at 6:56 am, Tue 9th Jun 2009)]]></description><author>no@spam.com (Lalit Bhatt)</author><pubDate><![CDATA[Tue, 09 Jun 2009 06:56:47 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13092</guid></item><item><title><![CDATA[Comment #6]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12146</link><description><![CDATA[Very well written and very easy to follow. Great tutorial which has helped me immensely.<br/><br/>
(Comment posted by Iain at 6:28 am, Tue 21st Oct 2008)]]></description><author>no@spam.com (Iain)</author><pubDate><![CDATA[Tue, 21 Oct 2008 06:28:51 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12146</guid></item><item><title><![CDATA[Comment #7]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12264</link><description><![CDATA[it's nice tutorial.thanks, really help me to create a quiz :)<br/><br/>
(Comment posted by fetty at 1:37 am, Thu 13th Nov 2008)]]></description><author>no@spam.com (fetty)</author><pubDate><![CDATA[Thu, 13 Nov 2008 01:37:44 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12264</guid></item><item><title><![CDATA[Comment #8]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12310</link><description><![CDATA[I got  a few errors while copying and pasting the code in the tutorial, but when I used the download files everything went ok.
Great tutorial, anyway.<br/><br/>
(Comment posted by Curro at 6:37 am, Sun 23rd Nov 2008)]]></description><author>no@spam.com (Curro)</author><pubDate><![CDATA[Sun, 23 Nov 2008 06:37:05 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12310</guid></item><item><title><![CDATA[Comment #9]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12352</link><description><![CDATA[I'd like to know how can I get the result of the test. Is there a way to have the final score sent to me by email. Lets say somebody hits 75% of the test. I'd like to have a string to tell whether this person was approved or not.<br/><br/>
(Comment posted by Eddie at 4:04 pm, Wed 3rd Dec 2008)]]></description><author>no@spam.com (Eddie)</author><pubDate><![CDATA[Wed, 03 Dec 2008 16:04:45 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12352</guid></item><item><title><![CDATA[Comment #10]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12399</link><description><![CDATA[I love this tutorial. It's like nothing I've seen so far, and it's so detailed that it answers all my questions, and just when I'm about to ask them. I was like, "wait a minute, why is th- oh, here it is".<br/><br/>
(Comment posted by Michael at 7:09 am, Thu 11th Dec 2008)]]></description><author>no@spam.com (Michael)</author><pubDate><![CDATA[Thu, 11 Dec 2008 07:09:43 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12399</guid></item><item><title><![CDATA[Comment #11]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12434</link><description><![CDATA[Jody, you're a genius at breaking down a problem into learnable bits and explaining them. Once again, one of the best articles on OOP in AS3 that I've seen. Bravo! More!<br/><br/>
(Comment posted by Paul Ricketts at 9:47 am, Sat 20th Dec 2008)]]></description><author>no@spam.com (Paul Ricketts)</author><pubDate><![CDATA[Sat, 20 Dec 2008 09:47:19 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12434</guid></item><item><title><![CDATA[Comment #12]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12489</link><description><![CDATA[For about a month I've been reading books and books and books and although I read every details all those books in details but I was afraid of actually getting involved in really witting a class... But now in just 2 days that I am trying online tutorials and specially your tutorials, I feel like I'm really doing something useful, all thanks to you Jody. I'm going to do some more tutorials until I feel more comfortable with other things and XML and then I will start witting my own classes finally :)

I used to code in AS2 for more than 4 years but AS3 and classes are absolutely a great tool to enable you code real big applications and on top of that, being able to manage everything easily and keep the software updated with no problem :)

Thanks,
Hadi<br/><br/>
(Comment posted by Hadi Tavakoli at 4:52 pm, Wed 7th Jan 2009)]]></description><author>no@spam.com (Hadi Tavakoli)</author><pubDate><![CDATA[Wed, 07 Jan 2009 16:52:17 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12489</guid></item><item><title><![CDATA[Comment #13]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12494</link><description><![CDATA[Great tutorial!
If one were to populate the quiz through xml, would it make sense to set up a separate class as well?<br/><br/>
(Comment posted by Carl at 1:39 pm, Fri 9th Jan 2009)]]></description><author>no@spam.com (Carl)</author><pubDate><![CDATA[Fri, 09 Jan 2009 13:39:06 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12494</guid></item><item><title><![CDATA[Comment #14]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12772</link><description><![CDATA[This tutorial was great. As an experienced C++ programmer, it has helped me to see the similarities to Actionscript. Thanks alot!<br/><br/>
(Comment posted by Mike at 12:49 pm, Wed 18th Mar 2009)]]></description><author>no@spam.com (Mike)</author><pubDate><![CDATA[Wed, 18 Mar 2009 12:49:58 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment12772</guid></item><item><title><![CDATA[Comment #15]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13161</link><description><![CDATA[how would you set it up so it can be preloaded?
I'm going to put a lot of pictures into it so I need to show how much is loaded.<br/><br/>
(Comment posted by HS94 at 12:53 pm, Tue 23rd Jun 2009)]]></description><author>no@spam.com (HS94)</author><pubDate><![CDATA[Tue, 23 Jun 2009 12:53:47 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13161</guid></item><item><title><![CDATA[Comment #16]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13198</link><description><![CDATA[What an awesome article! I've been looking for something like this for a while, and kaboom! You have wrote one and explained everything so awesome! Thanks for your help! 8)<br/><br/>
(Comment posted by UncleNinja at 10:01 am, Mon 6th Jul 2009)]]></description><author>no@spam.com (UncleNinja)</author><pubDate><![CDATA[Mon, 06 Jul 2009 10:01:11 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13198</guid></item><item><title><![CDATA[Comment #17]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13562</link><description><![CDATA[I am getting the following error messages. Can anyone assist me?
lines 15-17   1046: Type was not found or was not a compile-time constant: Button.
lines 62,69,76   1180: Call to a possibly undefined method Button.<br/><br/>
(Comment posted by Felesia at 2:21 pm, Mon 12th Oct 2009)]]></description><author>no@spam.com (Felesia)</author><pubDate><![CDATA[Mon, 12 Oct 2009 14:21:00 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13562</guid></item><item><title><![CDATA[Comment #18]]></title><link>http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13564</link><description><![CDATA[Merci Beaucoup.
J'ai compris les notions d'objet et de classe en AS3.<br/><br/>
(Comment posted by Stephane at 7:22 am, Tue 13th Oct 2009)]]></description><author>no@spam.com (Stephane)</author><pubDate><![CDATA[Tue, 13 Oct 2009 07:22:23 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/724/1/Create-a-Quiz-Application-Using-AS3-Classes/Page1.html#Comment13564</guid></item></channel></rss>