1701/090
Flash-自定义右键菜单
AS2版本:
myMenu = new ContextMenu();//新建自定义的右键menu
myMenu.hideBuiltInItems();//隐藏系统鼠标右键
myMenu.customItems.push(new ContextMenuItem("DFdou's Blog", blog, false));
function blog() {
getURL("http://nwhy.org","_blank");
}
_root.menu = myMenu;
AS3版本:
var myMenu:ContextMenu = new ContextMenu();
var myBlog:ContextMenuItem = new ContextMenuItem("DFdou's Blog");
var blogURL:String = "http://nwhy.org";
var request:URLRequest = new URLRequest(blogURL);
myMenu.hideBuiltInItems();
myMenu.customItems.push(myBlog);
myBlog.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,blog);
function blog(e:ContextMenuEvent):void
{
navigateToURL(request);
}
this.contextMenu = myMenu;
Some Related Posts
- 2009/01/12 -- AS3学习-跟AS2的差异记录 (0)
- 2009/11/30 -- iPhone-Adobe Flash和Microsoft SliverLight (0)
- 2009/11/27 -- Flash-New knowledge exchange for Flex/Flash/AIR developers (0)
- 2009/11/25 -- 记得关注你的竞争对手 (0)
- 2009/11/19 -- Flash-数组作为函数参数时传的是引用 (0)
- 2009/11/04 -- Flash-Global Error Handling in AIR 2.0 and Flash 10.1 (0)
- 2009/10/15 -- CU3ER-Flash 3D image slider (0)
- 2009/10/13 -- Flash vs Qt: The next battle? (0)
- 2009/10/08 -- Flash to iPhone (0)
- 2009/09/07 -- Flash-一些常用物理公式和AS3的结合应用 (1)
Tag: custom menu, Flash
Leave a comment
Categories
- AIR+FB+AS3 (157)
- Android (22)
- Demo (71)
- fDEV (3)
- Flash AS2 (65)
- Game (17)
- jQuery (14)
- Others (93)
- PHP (42)
- Wordpress (60)
Recent Comments
- DFdou says under AS3-Caurina 动画类import caurina.transitions.Tweener; import caurin...
- DFdou says under Android-Permission V1.0:jrjr
- DFdou says under AS3-Captcha验证码类@太阴真人, HI,可以提供下具体是第几行报的错么
- 太阴真人 says under AS3-Captcha验证码类1084: 语法错误: rightparen 应在 semicolon 之前。 1084: 语法...
- DFdou says under Air-fWeather Google Weather Api使用例子@soluo, 是这个没错,这个数据的确是乱七八糟的,不是很准确~
- soluo says under Air-fWeather Google Weather Api使用例子博主,您好,请教您一个Google Weather Api的问题: 我用Google Weather...
- Anonymous says under Android-ListView用法:dahan
- DFdou says under Android-一些常用技巧手动调用MEDIA_SCANNER: Intent intent = new Intent(Inte...
- DFdou says under Flex – MXML组件开发@冬瓜, :dahan
- 冬瓜 says under Flex – MXML组件开发豆腐啊 你写的东西都好技术啊! :wc
Blogroll
Archive
- March 2010 (4)
- February 2010 (13)
- January 2010 (9)
- December 2009 (19)
- November 2009 (23)
- October 2009 (17)
- September 2009 (22)
- August 2009 (13)
- July 2009 (20)
- June 2009 (18)
- May 2009 (18)
- April 2009 (29)
- March 2009 (31)
- February 2009 (46)
- January 2009 (37)
- December 2008 (16)
- November 2008 (12)
- October 2008 (21)
- September 2008 (10)
- August 2008 (12)
- July 2008 (14)
- June 2008 (8)
- May 2008 (11)