Forums

This topic is locked

flash action script

Posted 28 Apr 2005 13:23:48
1
has voted
28 Apr 2005 13:23:48 grahame lambert posted:
i have just start using action script, im trying to set up a multi awnser question so that when the person clicks the right answer a tick apears next to it and when they click the wrong answer an x apears. i know its most likly to be simple but im not sure what script to use and which variables to use<img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle><img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle>

Replies

Replied 28 Apr 2005 18:00:41
28 Apr 2005 18:00:41 Chris Charlton replied:
Actually, it isn't an "easy" script and there aren't magic variables to use. You make your own variables, er, I should say <i>Arrays</i> since that's what I found to be best.

If you are familar with Arrays, then you will want an Array of "correct" answers, and create a function that will take your correct Array, and jumble it (auto-generate) with wrong answers (or among the wrong answers). Well, you don't have to jumble anything, but I don't think you wanted people to come back and know the path of answers.

I don't want to confuse you more, but I made a function that would change the question/answers, using the same dynamic text field(s). The questionChanger function is called each time they finish choosing an answer. I wish I had code to show you, but I honestly don't anymore - maybe one day I'll do a Premium Article on the whole subject of doing a quiz. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

<b>Example:</b> host.buzzfirst.com/metallica/

~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>

Reply to this topic