Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function emptyFunction()
- {
- //empty function
- }
- function openVisualLink()
- {
- getUrl("e.g. YT Link", "_blank"); //open new URL in a new TAB (remove the second parameter to open new URL in current TAB)
- }
- function openMusicLink()
- {
- getUrl("e.g. YT Link", "_blank"); //open new URL in a new TAB (remove the second parameter to open new URL in current TAB)
- }
- var credits = new ContextMenu(); //creates new ContextMenu Object
- credits.hideBuiltInItems(); //disables normal entries like "Quality" "show all" "100%" etc.
- var link1 = new ContextMenuItem("ENTER TEXT HERE", openMusicLink); //creates new menu entry (the function "openMusicLink" is specified here. this is executed when someone clicks on the menu entry)
- var link2 = new ContextMenuItem("ENTER TEXT HERE", openVisualLink);
- var menu1 = new ContextMenuItem("ENTER TEXT HERE",emptyFunction); //creates new menu entry (A function must be specified. For this reason, an empty function is assigned here)
- var menu2 = new ContextMenuItem("ENTER TEXT HERE",emptyFunction);
- var menu3 = new ContextMenuItem("ENTER TEXT HERE",emptyFunction);
- menu1.separatorBefore = true; //adds an line above of entry "menu1".
- credits.customItems.push(link1); //add the menu items to your ContextMenu Object
- credits.customItems.push(link2);
- credits.customItems.push(menu1);
- credits.customItems.push(menu2);
- credits.customItems.push(menu3);
- _root.menu = credits; //assign new ContextMenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement