What is the use of void in Action Script 3.0?
Can any one give brief explanation with example?
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.
It’s a function type. It means that it doesn’t return any data
By default Flash always expect to return a value. If you write a function like this for example:
ActionScript Code:
Flash assumes that returning a value is still possible and so watch for it which uses ressources. When you specify :void you are actually telling Flash to not expect any return value so Flash does not waste resources watching for it.