Personalize the right mouse button content

Source: Internet
Author: User
Tags functions
Mouse | Right button

You may have seen a lot of good flash works, the author will be the same as the static menu content of the right mouse button to rich their own personalized menu items. So how did he do it, no doubt, all as the credit. First look at my personality right mouse button:




How, also can it, nonsense say less, start!
Turn on flash and go to the action panel.

Write three functions first, which is what you want to call when you finish clicking the right-click menu.
The first function is to open a Windows Component window with some information about me. Of course, you can also write a function to open a movie clip or animation or something, as long as it can highlight your personality on it
Enter the following code:

function Zkrmenuf () {
Import Mx.managers.PopUpManager;
Import Mx.containers.Window;
var mytw = popupmanager.createpopup (_root, window, true, {closebutton:true, Contentpath: "Zkr", Title: "Webjx"});
Mytw.setsize (320, 300);
mytw._x = 160;
Mytw._y = 50;
WindowListener = new Object ();
Windowlistener.click = function (evt) {
Mytw.deletepopup ();
};
Mytw.addeventlistener ("click", WindowListener);
}//the next two functions have nothing to say, that is, the sheer opening of two page links, the _blank parameter means to open a new window, rather than continue to open the link in the original window.
function Zkrmenuf1 () {
GetURL ("http://www.webjx.com/", "_blank")
}
function Zkrmenuf2 () {
GetURL ("http://bbs.webjx.com/", "_blank")
}
Create a ContextMenu class to add custom menu items
var zkrmenu1 = new ContextMenu ();
Hide Flash default menu items
Zkrmenu1.hidebuiltinitems ();
To create a custom menu item
Zkrmenu1.customItems.push (New Contextmenuitem ("Contact Me", Zkrmenuf, true));
Zkrmenu1.customItems.push (New Contextmenuitem ("Home", ZKRMENUF1, True)
Zkrmenu1.customItems.push (New Contextmenuitem ("forum", Zkrmenuf2, True)
Specifies the contents of the movie's right mouse button menu item for the newly set ZKRMENU1
_root.menu = zkrmenu1;
  

Publish the movie, click the Mouse, the custom menu item appears, as for setting ... And about Macromedia Flash Player 7 ... the last two items cannot be replaced.

Work out, a full personality of the right mouse button menu item was born, the next thing is to expand your imagination of the mind, to expand it.

  source File Download

Source: The Empire of the shining guest         




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.