package org.FLVPlayer { import flash.display.MovieClip; import flash.display.Sprite; import flash.events.ContextMenuEvent; import flash.net.*; import flash.ui.ContextMenu; import flash.ui.ContextMenuBuiltInItems; import flash.ui.ContextMenuItem; public class CustomContextMenu extends Sprite { private var myCM:ContextMenu; public function CustomContextMenu(destination:MovieClip) { myCM = new ContextMenu(); removeDefaultItems(); addCustomMenuItems(); myCM.addEventListener(ContextMenuEvent.MENU_SELECT, menuSelectHandler); destination.contextMenu = myCM; } private function removeDefaultItems():void { myCM.hideBuiltInItems(); var defaultItems:ContextMenuBuiltInItems = myCM.builtInItems; defaultItems.print = false; } private function addCustomMenuItems():void { var item:ContextMenuItem = new ContextMenuItem("FLV Flash Fullscreen Video Player"); myCM.customItems.push(item); item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler); } private function menuSelectHandler(event:ContextMenuEvent):void { } private function menuItemSelectHandler(event:ContextMenuEvent):void { navigateToURL(new URLRequest("http://www.video-flash.de/flv-flash-fullscreen-video-player/"), "_blank"); } } }