Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Learning interactions (radio buttons) |
From: | Helen Triolo |
Date: | Mon, 8 Jan 2001 19:44:49 GMT |
Gerardo (and anyone else who might be interested),
Over the weekend, I put a one-frame movie together that creates two
user-defined objects (a radio button object, and a question object that
contains radio buttons) and uses these objects to display questions and
return the answers. I've posted it, with a downloadable fla, at my
Flash 5 journal:
http://i-technica.com/flash5/index.html, Jan 8 entry
You could just copy the 2 objects, the toggleChoice method (used by
questionObject), and global variable nNextDepth (which I wish could be
incorporated into the objects more neatly, but I couldn't think of a
way) and then change the lines that create new question objects to suit
your own purposes. Those lines look like this:
oQuestion1 = new questionObject(1,"Which city is in Asia?",["Moscow",
"Lima", "Tunis", "Chengdu", "Kona"],3,220,40);
where the parameters are:
question number
question text
array of answers
correct answer (array index)
x location on stage where question is to begin
y location (same)
You'll also need to use the 3 mc's and on/off button in the library (or
some equivalent) and make sure linkages are set appropriately for
radioButtonMC and questionTextMC. showAnswers is an MC that is blank,
but contains an onClipEvent(enterFrame) routine to continuously display
the selected answer. It's dragged onto the stage to update the answer
display, and would need to be changed as necessary for your purposes
also.
(This may be just as confusing as the Learning Interactions example; I
did it as sort of a learning sample for myself so am not sure how easy
it is to follow or modify for someone else...)
Regards,
Helen
-----------------------------------------------------
i-Technica � http://i-technica.com � 301.424.6037
developer resources: http://i-technica.com/whitestuff
gmartinezdoggettdata [dot] com wrote:
>
> Hi everyone!
>
> I'm trying to use the new learning interactions that come with Flash 5 in a
> small test application. I use 4 radio buttons where the user can click in
> answer to a question. My problem: How do I keep track of what radio button
> they clicked? In other words how do I get the state of a radioButton using
> ActionScript. I thought that these learning interactions save time, but
> instead this small project is taking longer.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Learning interactions, gmartinez
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]