ActionScript 3 Context Menu Per Sprite?
- by TheDarkIn1978
is it not possible to have different context menus for different sprites on the stage?
i've tried adding a custom context menu to a sprite but it's applied to the entire stage:
mySprite.contextMenu = myMenu;
then after reading the documentation where it states:
You can attach a ContextMenu object to
a specific button, movie clip, or text
field object, or to an entire movie
level. You use the menu property of
the Button, MovieClip, or TextField
class to do this.
ok, so i though i had to write it like:
mySprite.menu.contextMenu = myMenu;
only to be greeted with a nice migration issue stating that menu is legacy code and to use contextMenu instead. ??? um, thanks for the headsup, documentation.
this process would be entirely much more easier if i could extend the ContextMenu, but for some reason it's marked as "final" and can't be extended... i'm sure adobe's reasons for finalizing the context menu class are as good as their reasons for including misleading documentation.
thoughts?