4 Replies Latest reply on Nov 20, 2006 10:12 PM by abeall

    ContextMenuItem

    abeall Level 3
      Wondering if anyone else gets the same results. Try this on a new document:

      var cm = new ContextMenu();
      cm.hideBuiltInItems();
      cm.customItems.push( new ContextMenuItem("Select",select,false,true,true) );
      cm.customItems.push( new ContextMenuItem("Rename",rename,false,true,true) );
      _root.menu = cm;

      function select(){}
      function rename(){}

      Publish, right click. Why doesn't "Select" appear in the menu? Now, rename "Select" to "Selects". Why does it appear now?
        • 1. Re: ContextMenuItem
          Level 7


          abeall wrote:
          > Wondering if anyone else gets the same results. Try this on a new document:
          >
          > var cm = new ContextMenu();
          > cm.hideBuiltInItems();
          > cm.customItems.push( new ContextMenuItem("Select",select,false,true,true) );
          > cm.customItems.push( new ContextMenuItem("Rename",rename,false,true,true) );
          > _root.menu = cm;
          >
          > function select(){}
          > function rename(){}
          >
          > Publish, right click. Why doesn't "Select" appear in the menu? Now, rename
          > "Select" to "Selects". Why does it appear now?

          "select" it's a reserved work and you can't use it.
          Try something else like "Select It"

          --
          Best Regards

          Urami


          --


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>
          • 2. Re: ContextMenuItem
            Level 7
            work=word
            • 3. Re: ContextMenuItem
              Marghoob Suleman
              and even copy and paste words are also reserved.
              • 4. Re: ContextMenuItem
                abeall Level 3
                You can't even use a reserved word as a label? That doesn't totally make sense to me... phooie. Went with "Select objects" in this case.

                Thanks urami and Marghoob.