Solved

Add Timer to Quiz Template

Posted on 2004-08-17
4
655 Views
Last Modified: 2008-03-17
I am using the Quiz template supplied with Flash MX. I would like to add a timer that starts on the first question and stops on the results page and writes the total time taken on the quiz to the screen. I am also randomizing the questions. Please help.
0
Comment
Question by:LOBO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 125 total points
ID: 11828878
hi i'm not sure how the quiz template works, (never used it before) - but to create a timer you just need to use the setInterval to count seconds, like so:

function callback() {
      valuer = valuer+1;
      trace(valuer);
      //set textfield to whatever
      if ((valuer>20) || (valuer == 0)) {
            clearInterval(id);
      }
}
valuer = 0;
id = setInterval(callback, 1000);

then, at the last question, set another variable to equal what valuer is...... show that in the textfield, and reset valuer to 0.

and that should do it.

blu.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question