…if you want it.
It’s just a quicky, as someone was asking for how to use the new ContextMenu, I made a quick example with what can be done, wrote a few lines to go with it in Word, and here you go…
Feel free to change anything you want to… all yours
Thanks, K
An afterthought: you may want to add in somewhere that for the textfield (copy/cut/paste/select all) / url (open/open new win…) context menus, the user doesn’t have to do anything, it’s built in…
/the function can be anything you want, it will have to take these 2 parameters, but then the code to execute is really all up to you, I used (here) a getUrl to open the mail client with a predefined subject and message header; in the swf also a gotoAndPlay/Stop, a regular getURL to open a _blank webpage to the forums, another item linking to Flashkit which is set to disabled, and finally a function to have the bug¡¦s head clip play to another frame, it is really anything you can come up with…!/
//finally, we need to associate the new menu with a clip (or button, or textfield), and we¡¦re done.
mail_mc.menu = mail_cm;
//do not get confused with the code hint extensions : _cm for contextmenu, _mc for movieclip ! ļ
some funky characters in this comment!? the f° at the end, and the bugi|s and wei|re !? Is that your spellchecker or mine?
Rest looks ok, if anyone wants to review/comment/correct/add, please feel free to
Fixed that error eyez. Not sure why that happened. I bet it was because I was copying all of the text from Word and pasting them in Notepad before inserting them using FrontPage :beam:
Think we could rename it to “Right-click Context Menu” ? I think more people will be able to look at the title and understand the tutorial better that way. Wuddaya think?
I noticed a typo somewhere, have to re-read,
on some letter combinations, my left hand
always wins over the right and the letters get inverted;
also I used _cm for the contextMenuItem in
some place(s?), should be _cmi really…