sådan hér:
stop();
var mcm:ContextMenu = new ContextMenu();
mcm.hideBuiltInItems();
item1 = new ContextMenuItem("Next", goNext, false, true, true);
item2 = new ContextMenuItem("Preview", goPrev, false, false, true);
item3 = new ContextMenuItem("Last Picture", goLast, true, true, true);
item4 = new ContextMenuItem("First Picture", goFirst, false, false, true);
item5 = new ContextMenuItem("© Nicolaj Wahlqvist", visitSite, true, true, true);
mcm.customItems.push(item1, item2, item3, item4, item5);
_root.menu = mcm;
function goNext(){
_root.nextFrame();
setup();
}
function goPrev(){
_root.prevFrame();
setup();
}
function goLast(){
_root.gotoAndStop(_totalframes);
setup();
}
function goFirst(){
_root.gotoAndStop(1);
setup();
}
function visitSite(){
getURL("
http://www.mitsite.com/");
}
function setup(){
item1.enabled = (_root._currentframe == _root._totalframes ? false : true);
item2.enabled = (_root._currentframe == 1 ? false : true);
item3.enabled = (_root._currentframe == _totalframes ? false : true);
item4.enabled = (_root._currentframe == 1 ? false : true);
}