Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Troubles with variables and a Quiz |
From: | ryan schroeder |
Date: | Thu, 26 Oct 2000 12:37:47 +0100 |
Hi all
I've hit a brick wall on my first trip through attempting to use variables
in flash. I'm trying to create a quiz.
The way I would like it to work, is when you click on one the multiple
choice answers it sets a variable (ie q1 = one) then after going through the
four questions you hit the "how'd I do?" button and based on the value of
the varibles several movie clips are directed to a frame.
This is what I've done so far
In frame 1 I do this
q1 = "zero";
In frame 2 I've got three buttons that set the value of a
on (release) {
q1 = "one";
}
(or q1 = "two" or q1 = "three" depending on the button)
And a fourth button that does
on (release) {
tellTarget ("/script") {
gotoAndPlay (2);
}
trace (q1);
trace (typeof(q1));
}
Frame 2 of the mc "script" is:
if (q1 == "three") {
trace ("pig");
}
trace ("dog");
a is returned correctly and it type is string
But I never see "pig" only "dog".
Am I even close here? My process _seems_ logically correct but this is the
first time I dealt with variables etc. Any help would be great.
-ryan schroeder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
RE: FLASH: Troubles with variables and a, Matthijs Koevoets
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]