Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : ?IS THIS A BOOK?



cabp ms
6/17/2004 9:57:13 PM
Hi all, i added this code in my mc to build my own context menu, the problem is
this: when the heigth of mc is 136 pixels or less the "SETTINGS" item in
context menu is disabled!!! That's what I want!!! but when the heigth of mc is
137 or more pixels it is enabled again, i don't use any command to hide that
item but it is disabled, any body know why this is happening??? have you ever
seen this before???

I would like to disable that item too... is it possible in a real form??? THE
CODE:

//***********************************************
var showItem = true;
my_cm = new ContextMenu(menuHandler);
my_cm.customItems.push(new ContextMenuItem("About me...", itemHandler));
my_cm.customItems.push(new ContextMenuItem("About you", itemHandler));
my_cm.customItems.push(new ContextMenuItem("Exit", itemHandler));
my_cm.builtInItems.quality=false;
my_cm.builtInItems.print=false;
my_cm.builtInItems.zoom=false;
function menuHandler(obj, menuObj)
{
if (showItem == false)
{
menuObj.customItems[0].enabled = false;
menuObj.customItems[1].enabled = false;
}
else
{
menuObj.customItems[0].enabled = true;
menuObj.customItems[1].enabled = true;
}
}
function itemHandler(obj, item)
{
if(item.caption=="About me...")
fscommand("command", "parameter");
else if(item.caption=="About you")
fscommand("command", "parameter");
else if(item.caption=="Exit")
fscommand("quit");
}
_root.menu = my_cm;
//***********************************************

Peter Blumenthal
6/18/2004 10:36:48 AM
if it is it's a very *thin* book....

AddThis Social Bookmark Button