21 October 2005

Flash ContextMenu Gotcha

Written by Richard Leggett ( Contact the author of this post )
Published on October 21st, 2005 @ 03:06:50 pm, using 95 words, 232 views
Categories: Flash

No doubt some of you have come across this. Just one for the record. It seems Flash doesn't allow certain words for labels to ContextMenuItems. "Delete", "Open" and "Save" for example.

I haven't had time to investigate fully, but the following two snippets of code on a frame will show the problem.

// Doesn't work
var cm:ContextMenu = new ContextMenu();
var cmi:ContextMenuItem = new ContextMenuItem("Delete", handler);

cm.customItems.push(cmi);
menu = cm;

function handler() {}
// Works
var cm:ContextMenu = new ContextMenu();
var cmi:ContextMenuItem = new ContextMenuItem("Delete2", handler);

cm.customItems.push(cmi);
menu = cm;

function handler() {}

Comments, Pingbacks:

Comment from: Brajeshwar
It do no even allow words like Macromedia,
http://www.brajeshwar.com/archives/2003/08/context-menu-and-the-forbidden-word/
An example
http://www.brajeshwar.com/archives/2003/08/contextmenu-selective-menu-items/
But then, wish there were more application specific context menu implementation
http://www.brajeshwar.com/archives/2004/09/contextmenu-is-that-for-8ball/
PermalinkPermalink 21/10/05 @ 16:14
Comment from: Richard Leggett [Member] Email
Ah thankyou Brajeshwar, I had a quick Google but didn't find your post. Cheers :)
PermalinkPermalink 21/10/05 @ 16:16
Comment from: Carlos Rovira
For me the most important problem is that you can't use it in nested MovieClips.

If you have a ScrollPane and inside you have MovieClips in the container MC, you can use it.

I hope this was fixed in new players (8, 8.5,...)
PermalinkPermalink 21/10/05 @ 23:23
Comment from: Richard Leggett [Member] Email
Hey Carlos,

Actually I'm doing this at the moment :) It is fixed in 8.
PermalinkPermalink 22/10/05 @ 12:05
Comment from: Luis
I came across this problem a few weeks ago too, and apparently some of the words that work in MX2004 do not work in 8 and viceversa:

http://www.blog.lessrain.com/?p=223
PermalinkPermalink 31/10/05 @ 08:47
Comment from: Richard Leggett [Member] Email
Ah thanks Luis, I'm also going to put a link to another CM gotcha for completeness:

http://www.bitchwhocodes.com/archives/2005/10/context_menu_go.html
PermalinkPermalink 31/10/05 @ 15:25
Comment from: kancelaria
Recorder digital sony Kamery Cyfrowe kamera, super notebooki Notebooki , jeszcze jeden super producent ibm Camcoo the best siemens , wspaniałe tv plasma Telewizory Plazmowe , największa oferta lcd Telewizory Lcd , odtwarzacze dvd samsung dvd , zestawy kina domowego kino domowe , zabudowa kuchenna amica whirlpool kuchnie , wow jura the best ekspresy do kawy , lge electro super promocje lg , i like sony music sony spoki doki , acer laptopy acer , samsung lodówki samsung , siemens group Nikon , panasonic albo panasonik panasonic , toshiba notebooki sklep toshiba , amica piekarniki amica , chłodziarki Lodówki, COMPAQ najlepsza firma oly the best firms hp, super firma whirlpool najlepsza jakość , lodówka jest ok ale pralka to jest coś ale nie przeceniaj Pralki . MaxiMedia group . Canon Aparaty cyfrowe .


PermalinkPermalink 18/02/06 @ 16:20

Comments are closed for this post.

About

Richard Leggett is an RIA and Web Developer, co-founder of Ubrae Ltd. He is co-author of Foundation Flash Applications for Mobile Devices (Friends of ED), an Adobe Community Expert and speaker at industry conferences and user groups.



January 2009
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Categories

Miscellany

XML Feeds

Information

Contact the admin  /   b2evo template by Two18 Media