|
-
Both of deadlock's solutions are also good.
To answer your question, you must "bury" the gotoAndStop because addEventListener requires a Function as the second argument. If you did it the way you propose, the gotoAndStop would be executed at the time of the addEventListener call, and not when the event actually happens. Further, since the result of that function is void, you get the compile error you saw.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|