Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide error messages after a time period

Status
Not open for further replies.

albie101

Programmer
Oct 8, 2001
50
NZ
I have a movie which displays simple error messages in a dynamic text field when you do something wrong. I want to be able to hide the messages after say 8 seconds but I'm not quite sure how to go about doing it. Any ideas?
 
If you put the message clearing code in a function you can use setInterval():

clearError = function () {
// set dynamic textbox to empty
errorMessage.text = "";
// get rid of interval after it's done its job
clearInterval(clearMessage);
};
//time set in milliseconds
clearMessage = setInterval(clearError, 8000);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top