Well, I implemented a different strategy. I changed addCustomMenuItem in ContextMenuBuilder.as:
CONFIG::commercialVersion
private function addCustomMenuItem(menu:ContextMenu, label:String, itemIndex:int, callback:String, separatorBeforeNextItem:Boolean):void {
if (! callback || callback == "null") {
addItem(menu, new ContextMenuItem(label, separatorBeforeNextItem, false));
} else if (callback.substring(0, 7) == "http://" || callback.substring(0, 8) == "https://") {
log.debug("creating item with url");
addItem(menu, new ContextMenuItem(label, separatorBeforeNextItem, true), function(event:ContextMenuEvent):void {
navigateToURL(new URLRequest(callback), "_self");
});
} else {
log.debug("creating item with callback");
addItem(menu, new ContextMenuItem(label, separatorBeforeNextItem, true), createCallback(itemIndex));
}
}
It's not the prettiest, but if your "callback" routine starts with http:// or https:// then it will just create a url link to that address. Feel free to use this code, I created it and it is now GPL licensed as well. :-)
Example object embed code:
"contextMenu":[{"Get Custom Video":"http://mediamobz.com/postjob"},{"About MEDIAmobz...":"http://mediamobz.com/"}]