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);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.