heh,

I mean non-green classes. :)

Peace, Mike

On 3/26/06, Michael Schmalle <[EMAIL PROTECTED]> wrote:
dos,

A trick that I use with the help...

Hit help contents.

Then hit Language reference

Then hit Frames

Then look for ContentMenu, then a big example follows the more green Classes.

;-)

The helpp is really laid out well.


Peace, Mike

On 3/26/06, dos dedos < [EMAIL PROTECTED]> wrote:
LOL .. I'm using the 600 pages of documentation I printed as a pillow for now... (I can't read while I'm awake [too boring] and when I'm asleep the words get all scrambled and stuff... my import function is broke) ... still goingthru the first 200 pages

Thanks!!!!!111  =)


Michael Schmalle < [EMAIL PROTECTED]> wrote:
Hey,

Seeing as how the Help Content in FB2 works great, this might get you started;

package {
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.events.ContextMenuEvent;
import flash.events.ContextMenuEvent;
import
flash.display.Sprite;
import flash.display.Shape;
import flash.util.trace;

public class ContextMenuExample extends Sprite {
private var myContextMenu:ContextMenu;
private

var menuLabel:String = "Reverse Colors";

private var textLabel:String = "Right Click";
private var redRectangle:Sprite;
private var label:TextField;
private var size:uint = 100;

private var black:uint = 0x000000;

private var red:uint = 0xFF0000;

public function ContextMenuExample() {
myContextMenu = new ContextMenu();
removeDefaultItems();

addCustomMenuItems();

myContextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, menuSelectHandler);

addChildren();
redRectangle.contextMenu = myContextMenu;

}

private function addChildren():void {

redRectangle = new Sprite();
redRectangle.graphics.beginFill(red);
redRectangle.graphics.drawRect(0, 0, size, size);

addChild(redRectangle);
redRectangle.x
=
size;
redRectangle.y = size;
label = createLabel();
redRectangle.addChild(label);
}


private function removeDefaultItems():void {
myContextMenu.hideBuiltInItems
();
var defaultItems:ContextMenuBuiltInItems = myContextMenu.builtInItems;
defaultItems.print
= true;
}

private function addCustomMenuItems():void {
var item:ContextMenuItem = new ContextMenuItem(menuLabel);

myContextMenu.customItems.push(item);

item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
}

private function menuSelectHandler(event:ContextMenuEvent):void {

trace("menuSelectHandler: " + event);

}

private function menuItemSelectHandler(event:ContextMenuEvent):void {
trace("menuItemSelectHandler: " + event);


var textColor:uint = (label.textColor
== black) ? red : black;
var bgColor:uint = (label.textColor == black) ? black : red;
redRectangle.graphics.clear();
redRectangle.graphics.beginFill
(bgColor);

redRectangle.graphics.drawRect(0, 0, size, size);
label.textColor = textColor;
}

private function createLabel():TextField {
var txtField:TextField = new TextField();


txtField.text = textLabel;
return txtField;
}
}

;-)

Peace, Mike
}


On 3/26/06, dos dedos <[EMAIL PROTECTED]> wrote:

 
speaking of sunday morning hangover, it's CONTEXT not CONTENT :D ... sorry

dos dedos <[EMAIL PROTECTED] > wrote:

Hi

When I right-click on Flash/flex content I get the Adobe "About" context menu...

It would be very nice to have a context menu that relates to the functionality of your application not the functionality of the Flash player.

I believe I had heard it was possible ...

How?

Thanks a lot in advance


dos

New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.


Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS






--
What goes up, does come down.


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.



YAHOO! GROUPS LINKS






--
What goes up, does come down.



--
What goes up, does come down.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to