1. Home
  2. Computing & Technology
  3. Animation

Flash Color Quiz: What's Your Mood?

By , About.com Guide

6 of 10

Now it's time to add the code to each color option to assign a value to a variable that will tell the results page what results to display, as well as move the quiz to either the next question or the end results. Right-click on the first symbol and select Actions:
on (release) {
_root.tint = "yellow";
_root.gotoAndPlay(9);
}

This script creates a root-level variable called "tint", and assigns the string "yellow" as its value. (Notice that I put "yellow" in quotes so it would pass as a text string and nothing else.)

You can copy the script to the Actions for each of your options, and just change the string to reflect the correct option - such as "blue" and "orange".

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash for Games & Fun Stuff
  6. Flash Color Quiz: What's Your Mood?

©2009 About.com, a part of The New York Times Company.

All rights reserved.