Is it possible to create your own ADDED_TO_STAGE event?
I´m trying to pass some arguments to its handler…
It would be like this:
addEventListener(Event.ADDED_TO_STAGE, arg1, arg2, init)
There´s any workaround for this?
Thanks.
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.
Visiting this link will provide an in-depth answer on this, however here’s a quick and dirty snapshot:
You will need to either call another function from your listener function, or create a custom event to hold the properties you want to parse. The latter is recommended, but here’s how you could implement the former: