Hey guys, I need to display a message in a flash project I’m working on. The message needs to be centered on screen, and can only be created using code.
Normally I could just put a dynamic text box on and hide it, but I can’t this time.
Thanks,
Max
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would create a class that has a textfield centered within it. Then create a new instance when you need to display a message and add it to the stage. Here is a very simplified example:
I would add other functions to this and maybe even add a resize listener to keep it centered. You could also add a few buttons to close the message. The sprite is added only to disable any mouse clicks beneath the message. Does that help?