The following example hides all the built-in objects in the Context menu. (However, the Settings and About items still appear, because they cannot be disabled.)
var newMenu:ContextMenu = new ContextMenu();
newMenu.hideBuiltInItems();
this.menu = newMenu;
In this example, the specified event handler, menuHandler, enables or disables a custom menu item (using the ContextMenu.customItems array) based on the value of a Boolean variable named showItem. If false, the custom menu item is disabled; otherwise, it's enabled.
var showItem = true; // Change this to false to remove
var my_cm:ContextMenu = new ContextMenu(menuHandler);
my_cm.customItems.push(new ContextMenuItem("Hello", itemHandler));
function menuHandler(obj, menuObj) {
if (showItem == false) {
menuObj.customItems[0].enabled = false;
} else {
menuObj.customItems[0].enabled = true;
}
}
function itemHandler(obj, item) {
//...put code here...
trace("selected!");
}
this.menu = my_cm;
When the user right-clicks or Control-clicks the Stage, the custom menu is displayed.
Showing posts with label flash. Show all posts
Showing posts with label flash. Show all posts
Thursday, April 26, 2007
Friday, February 09, 2007
Fullscreen mode in Adobe flash browser player
Now you have option to get fullscreen mode in browser player too.Already stand-alone player has this implementation.now they have added new actionscript that will work in both stand-alone and browser player, and a new HTML parameter
The fullscreen mode initiated through Actionscript and you can terminate through Actionscript or by the user switching focus to another window.
But the problem is that You con't enter the text in textbox while in fullscreen mode.your keyboard input and key-related actionscript would be disabled while in fullscreen,except key borad shortcut that take user out of fullscreen mode.
To enable the fullscreen mode you have to install 9,0,28,0 or greater of Flash Player.
allowFullScreen to enable the fullscreenmodeThe fullscreen mode initiated through Actionscript and you can terminate through Actionscript or by the user switching focus to another window.
But the problem is that You con't enter the text in textbox while in fullscreen mode.your keyboard input and key-related actionscript would be disabled while in fullscreen,except key borad shortcut that take user out of fullscreen mode.
To enable the fullscreen mode you have to install 9,0,28,0 or greater of Flash Player.
Subscribe to:
Posts (Atom)