I have made a clock that runs from 0 to 60 seconds. I have turned it into a
Movie Clip named timer_mc. I have nested timer_mc within a parent timeline.
The parent timeline contains a set of ten math problems. As the student
answers each problem, he moves around in the parent timeline, but the clock in
timer_mc is unaffected and counts out how long the problems are taking to
answer. When the student has completed all ten problems I have loaded a
stop_btn that appears on the parent timeline.
Here is the question. How do I get this stop_btn to activate the actionscript
in the nested Movie Clip timer_mc?
The actionscript in timer_mc changes as the clock continues to run. For
example, frames 1-200 represent the first 20 seconds on the clock (each second
is 10 frames). If the student has completed the ten questions in the parent
Timeline and activated the stop_btn within these first 20 seconds, I want the
actionscript in frame1 in timer_mc to activate. If the student takes longer
than 20 seconds I want the actionscript at frame 201 to activate.
The actionscript that will be activated will be a simple gotoAndPlay command,
sending the student to a different location on the parent timeline. If under
20 seconds, text will pop up that reads "Good work", if over 20 seconds the
text will read "You are slow".
Thanks,
budd101
budd101 - 14 Sep 2007 19:25 GMT
I got the answer. If I place this action script in the child movie clip
timer_mc
_root.stop_btn.onRelease = function (){
_root.gotoAndPlay(171);
};
The stop_btn in the parent movie clip will activate the actionscript in the
child movie clip timer_mc. Because this is a timed test and the stop_btn will
appear only when the student has completed 10 problems, I placed this
actionscript in each individual frame of the child movie clip timer_mc.
budd101