I'm making a custom spark videoplayer including a custom contextmenu: The problem is :if video fails to load or i just don't input any source, my Custom menu works perfectly.
But i rather show some video with my player but with a source/input my contextmenu just doesn't react or work!
making my contextmenu:
private function initContextMenu():void{
var copyrightNotice:ContextMenuItem = new ContextMenuItem("sopyright notice",false,false);
var mySiteLink:ContextMenuItem = new ContextMenuItem("website",true,true);
var stretch:ContextMenuItem = new ContextMenuItem("Scalemode stuff",true,true);
var fullscreenToggle:ContextMenuItem = new ContextMenuItem("Toggle Fullscreen",true,true);
var customContextMenu:ContextMenu = new ContextMenu();
const cm:ContextMenu = new ContextMenu();
cm.hideBuiltInItems();
mySiteLink.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,gotowebsite);
cm.customItems.push(copyrightNotice);
cm.customItems.push(mySiteLink);
cm.customItems.push(stretch);
FlexGlobals.topLevelApplication.contextMenu = cm;
}