-
Keyboard events
When I am writing AS3 for a keyboard event, do I have to use "stage.addEventListener" or can I use "InstanceName.addEventListener"?
My problem is, I have a drop down menu which is used at different points on the timeline. I converted all of the drop down menus into separate movie files, and not just separate instances of the same movie file. Inside the movie files, I have written actionscript for keyboard events. However, I keep getting the error message "Duplicate Function." They are separate movies! Shouldn't Flash be able to tell the difference between them?
-
Registered User
hi,
You should add the event listener to the stage.
If you're receiving that error that's because you have a function defined in the same scope, at least twice.
Having functions with the same name on different timelines isn't a problem.
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
|