许多flash的右键显示内容都是默认的,能不能自己设置个性化的右键菜单呢?答案是可以的,我们来看看下面的AS脚本:function tab1() { getURL('http://www.nswlp.cn', '_blank'); } // End 

许多flash的右键显示内容都是默认的,能不能自己设置个性化的右键菜单呢?
答案是可以的,我们来看看下面的AS脚本:

function tab1()
{
    getURL("http://www.nswlp.cn", "_blank");
} // End of the function
function url1()
{
    getURL("http://www.nswlp.cn", "_blank");
} // End of the function
function url2()
{
    getURL("http://www.nswlp.cn", "_blank");
} // End of the function
Stage.scaleMode = "noScale";
var expandmenu = new ContextMenu();
expandmenu.hideBuiltInItems();
var $tab1 = new ContextMenuItem("www.nswlp.cn", tab1, false);
var $url1 = new ContextMenuItem("www.nswlp.cn", url1, true);
var $url2 = new ContextMenuItem("www.nswlp.cn", url2, true);
expandmenu.customItems.push($tab1,$url1,$url2);
expandmenu.onSelect = menuHandler;
_root.menu = expandmenu;


把里面相应的内容改成你的就好拉!

上一篇:PHP实例:给PHP源代码加密与解密的解决办法

下一篇:jQuery Ajax实例:简单跨域请求、错误调试帮助信息

评论列表
发表评论
称呼
邮箱
网址
验证码(*)
热评文章
相关阅读