2 Replies Latest reply on May 11, 2007 11:29 AM by homejian

    How to make the unicode works for the popup menu item label?

    lli123
      My popup menu item label "View Element","Edit Element"and "Delete Element" need to be translated on fly.

      So I created a class to add my custom menu items in the popup menu. I am passing in the menu item label with different language, but it is showed as ??? for the Chinese character. Who can give me a idea that thelp me to make the translation popup menu works?

      public class CanvasPopUpMenuControler
      {
      private var myContextMenu:ContextMenu;
      private const MENU_ITEM_VIEW:String="View";
      private const MENU_ITEM_EDIT:String="Edit";
      private const MENU_ITEM_DELETE:String="Delete";


      public function CanvasPopUpMenuControler(itemView:String,itemEdit:String,itemDelete:String):void
      {
      myContextMenu = new ContextMenu();
      var item:ContextMenuItem = new ContextMenuItem(itemView);
      item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuViewHandler);
      myContextMenu.customItems.push(item);

      item = new ContextMenuItem(itemEdit);
      item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuEditHandler);
      myContextMenu.customItems.push(item);

      item = new ContextMenuItem(itemDelete);
      item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuDeleteHandler);
      myContextMenu.customItems.push(item);
      }
      }

      Thanks,
      lucy