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)
- 2010/07/29 -- The Evolution of Adobe Flash: From 1996 to 2010 (0)
- 2009/11/30 -- iPhone-Adobe Flash和Microsoft SliverLight (0)
- 2009/11/27 -- Flash-New knowledge exchange for Flex/Flash/AIR developers (1)
- 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 (1)
- 2009/10/13 -- Flash vs Qt: The next battle? (0)
- 2009/10/08 -- Flash to iPhone (0)
Tag: custom menu, Flash
Leave a comment
听说你要找我?
- QQ:104357575
- Gmail:k5angle9527@gmail.com
Categories
- AIR+FB+AS3 (169)
- Android (28)
- Demo (78)
- fDEV (3)
- Flash AS2 (66)
- Game (22)
- iPhone (1)
- jQuery (14)
- Others (95)
- PHP (43)
- Wordpress (60)
Recent Comments
- Anonymous says under Discuz!验证码总是错误:wuwu :xizao :wuwu :wenhao :touxiang :shuaya ...
- Anonymous says under 有关Flash 8 Video Encoder无法启动的问题:chaocai :shengtian 高级感谢~~~我找了一个晚上了,嗨哭命呀! 不过幸好...
- DFdou says under AS3-留言板(GuestBook)更新@DFdou, :leilei 这样啊,thx 哦
- lightoy says under AS3-留言板(GuestBook)更新@DFdou, a...不要把amfphp里面的.htaccess文件上传即可~_!
- Anonymous says under Android-ListView用法:zhuang
- DFdou says under AS3-留言板(GuestBook)更新@Lightoy, amfphp和.htaccess不会有冲突啊
- DFdou says under GAME-NamePK 基于MD5的名字PK(上)@, 随意~~
- Anonymous says under jQuery-each(fn)的使用:loveu :leilei :kua
- Lightoy says under AS3-留言板(GuestBook)更新hi,你好,因为wordpress生成的.htaccess文件导致测试amfphp时产生了500 I...
- Anonymous says under GAME-NamePK 基于MD5的名字PK(上):shengtian 博主我可以弄走做个养成pk游戏么?
Blogroll
Archive
- August 2010 (3)
- July 2010 (3)
- June 2010 (3)
- May 2010 (4)
- April 2010 (4)
- March 2010 (8)
- 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)