view source

Flash Context Menu doesn’t allow ‘delete’

October 19th, 2007 . by polyGeek

While doing a prototype for a usability study I was asked to customize the context menu when a user right-clicked on a specific button. No problem except one of the custom menu options they wanted was “Delete”.

Everything worked in the context menu as you might expect except everything after the “Delete” was, well, deleted. And it wouldn’t display the “Delete” either. I kept checking my code to see if there was some silent failure I wasn’t seeing and then it occurred to me, “Maybe it doesn’t like the word “Delete”.

Sure enough, that was it. Change “Delete” to anything else and it works.

Below is the code that I used: ( download source )

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

5 Responses to “Flash Context Menu doesn’t allow ‘delete’”

  1. comment number 1 by: JabbyPanda

    Yeah, right, “delete” is a reserved word since Flash Player 5 and ContextMenu does not allow its items to have labels that are equal to reserved words in Flash.
    http://www.darronschall.com/weblog/archives/000102.cfm

    Actually avoid using all reserved words in all your code, even in namespaces ;)
    http://brianmriley.com/blog/?p=71

  2. comment number 2 by: polyGeek

    @JabbyPanda, thanks for the info and references.

  3. comment number 3 by: Olegs Balss

    Also ‘Open’, ‘Save’, ‘Cut’, ‘Copy’, ‘Paste’, ‘Select All’, ‘Undo’ are not available.

  4. comment number 4 by: Geoff

    You can use any reserved word by appending a no break space to the end of the word. To do this, on windows type “Alt+255″ on the numeric keypad.

  5. comment number 5 by: polyGeek

    @Geoff, good thinking.

Leave a Reply

Name

Mail (never published)

Website

- Why ask? This confirms you are a human user!

   




© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites