打造自己的Flash右键菜单(Flash右键菜单个性化设置)代码
分类:动画设计 Tags: flash 评论:0 浏览:8294 最近更新时间:2014/8/21 16:53:19
许多flash的右键显示内容都是默认的,能不能自己设置个性化的右键菜单呢?
答案是可以的,我们来看看下面的AS脚本:
function tab1()
{
getURL("http://www.yuzhiguo.com", "_blank");
} // End of the function
function url1()
{
getURL("http://wpa.QQ.com/msgrd?V=1&uin=286313315", "_blank");
} // End of the function
function url2()
{
getURL("http://www.yuzhiguo.com", "_blank");
} // End of the function
Stage.scaleMode = "noScale";
var expandmenu = new ContextMenu();
expandmenu.hideBuiltInItems();
var $tab1 = new ContextMenuItem("动画设计:余志国", tab1, false);
var $url1 = new ContextMenuItem("QQ交流:286313315(点击用QQ和余志国交流)", url1, true);
var $url2 = new ContextMenuItem("余志国网站设计工作室http://www.yuzhiguo.com", url2, true);
expandmenu.customItems.push($tab1,$url1,$url2);
expandmenu.onSelect = menuHandler;
_root.menu = expandmenu;
把里面相应的内容改成你的就好拉!