Wednesday, April 8, 2009

Default ContextMenu Items on Flash TextField

Is there any way to hide default context menu items on Flash TextField? Some one will try to answer with ContextMenu.hideBuiltInItems() function, but this function does not really work with Flash TextField. It does not hide the built in items.

So following code does work but not as expected ::

var myContextMenu:ContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();

var txt:TextField = new TextField();
txt.contextMenu = myContextMenu;
addChild(txt);

Now if you right click on TextField then you will see that you can see all the built in item. Any one knows why?

No comments: