Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-21-2006, 01:50 PM   #1
CDHBookingEdge
Registered User
 
Join Date: Oct 2006
Posts: 383
Send a message via MSN to CDHBookingEdge
Question hideBuiltInItems() problems any ideas?

Hi everyone. I'll warn you that I'm pretty much a newbie to Flex but I've been programming in other stuff for years.

Now what I'm trying to do is popup a customized context menu when bars on a column chart are right clicked. And I've got it working fine EXCEPT that even though I'm calling hideBuiltInItems(), it doesn't seem to be working. By that I mean all the built in items (Zoom, etc.) are there.

Here's what I've got as far as code:
private function MakeTheContextMenu():void
{
cmContextMenu = new ContextMenu();
beDetColSeries.contextMenu = cmContextMenu;
removeDefaultItems();
addCustomMenuItems();
}

private function removeDefaultItems():void
{
// Get rid of all the standard menu items
cmContextMenu.hideBuiltInItems();

// keep Print on there
var defaultItems:ContextMenuBuiltInItems = cmContextMenu.builtInItems;
defaultItems.print = true;
}


private function addCustomMenuItems():void
{
// First define how the labels should look
var lblOne:String = "This is label one...";
var lblTwo:String = "This is label two...";

// Now the contex menu items themselves
var cmiItemOne:ContextMenuItem = new ContextMenuItem(lblOne);
var cmiItemTwo:ContextMenuItem = new ContextMenuItem(lblTwo);

// Now put 'em in the menu
cmContextMenu.customItems.push(cmiItemOne);
cmContextMenu.customItems.push(cmiItemTwo);

// add the handlers
cmiItemOne.addEventListener(ContextMenuEvent.MENU_ ITEM_SELECT, cmiItemOneSelectHandler);
cmiItemOne.addEventListener(ContextMenuEvent.MENU_ ITEM_SELECT, cmiItemTwoSelectHandler);
}


Thanks in advance, for any ideas on a solution,
Christopher
CDHBookingEdge is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic input text box problems sebnewyork ActionScript 2.0 6 01-10-2007 03:56 PM
problems with flash and my browser-Please help me!! el duderino Other Flash General Questions 3 10-05-2005 04:32 AM
Problems with my CONTACT PAGE bsmill ActionScript 1.0 (and below) 1 08-22-2005 07:10 AM
.html and .htmlText problems graham link ActionScript 1.0 (and below) 1 01-09-2003 12:48 PM
levels, linkage of audio, and load movie problems to a specfic frame problems ooolie ActionScript 1.0 (and below) 0 12-05-2002 07:54 PM


All times are GMT. The time now is 11:23 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.