PDA

View Full Version : temporarilay pause program?


Kimchee
11-10-2008, 12:57 PM
I have a program that when a certain action is performed I want to be able to stop computing for about .5 seconds and have text pop up and then fade out.

2 problems. How can I pause the program while the text is fading out, and how can I get text to fade out? I image mytext.alpha +=.1 in a loop or something, but I imagine there is a slicker tween function or soomething.

raydowe
11-10-2008, 02:11 PM
For text, you can use a tween. Put the textbox inside a movie clip (holder_mc).


import fl.transitions.Tween;
import fl.transitions.easing.*;

var t:Tween = new Tween(holder_mc, "alpha", None.easeNone, 1, 0, 0.5, true);
// this creates a tween on holder_mc, changing it's alpha, easing it neither in
// or out but at a constant rate, from 1 to 0 over 0.5 seconds
// (seconds = true, frames = false)


to "pause the program", I'm not sure exactly what you mean, but you'll probably want to open Flash CS3 Help and search for 'Timer Class'