已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
flex swf html function onNsRightClick(e) if(e.which = 3) ownerarea.openRightClick(); e.stopPropagation(); return false; function onIeRightClick(e) if(event.button 1) ownerarea.openRightClick(); parent.frames.location.replace(javascript: parent.falseframe); return false; if(navigator.appName = Netscape) document.captureEvents(Event.MOUSEDOWN); document.addEventListener(mousedown, onNsRightClick, true); else document.onmousedown=onIeRightClick; swfhtmlAC_FL_RunContent wmode, opaque, flex private var mouseTarget:DisplayObject; private function init(): void ExternalInterface.addCallback(openRightClick, openRightClick); function openRightClick():void var e:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN, true, false, mouseTarget.mouseX, mouseTarget.mouseY); mouseTarget.dispatchEvent(e); function getMouseTarget(event:MouseEvent):void mouseTarget = DisplayObject(event.target); function showMouseEvent(event) /event.buttonDowntrueflash / var menu: Menu = new Menu(); menu = Menu.createMenu(null, buildMenu); menu.labelField = label; menu.show(10,10); =:1,FLEX,(HTML)2,FLEXHTML,FLEX,FLEX.3,FLEXmouseOver,4,HTML,(buttonDown=false),5,mouseDown,buttonDown,:HTML-FLEX-:1,FLEXHTML(OBJECTIDFlexTest) - functiononNsRightClick(e)if(e.which=3)FlexTest.openRightClick();e.stopPropagation();returnfalse;functiononIeRightClick(e)if(event.button1)FlexTest.openRightClick();parent.frames.location.replace(javascript:parent.falseframe);returnfalse;if(navigator.appName=Netscape)document.captureEvents(Event.MOUSEDOWN);document.addEventListener(mousedown,onNsRightClick,true);elsedocument.onmousedown=onIeRightClick;2,FLEXMXMLMOUSEOVERMXscript - importmx.events.MenuEvent;importmx.controls.Alert;privatevarmouseTarget:DisplayObject;functioninit()ExternalInterface.addCallback(openRightClick,openRightClick);functiongetMouseTarget(event:MouseEvent):voidmouseTarget=DisplayObject(event.target);functionopenRightClick():voidvare:MouseEvent=newMouseEvent(MouseEvent.MOUSE_DOWN,true,false,mouseTarget.mouseX,mouseTarget.mouseY);mouseTarget.dispatchEvent(e);functionshowMouseEvent(event)if(event.buttonDown=true)Alert.show(Left);elseAlert.show(Right);wmode,wmodeopaquetransparent - AC_FL_RunContent(src,playerProductInstall,FlashVars,MMredirectURL=+MMredirectURL+&MMplayerType=+MMPlayerType+&MMdoctitle=+MMdoctitle+,width,100%,height,100%,align,middle,id,FlexTest,/OBJECTIDwmode,opaque,/:quality,high,bgcolor,#869ca7,name,FlexTest,allowscriptAccess,sameDomain,type,application/x-shockwave-flash,pluginspage,/go/getflashplayer);ADOBEwmode:SetstheWindowModepropertyoftheSWFfilefortransparency,layering,andpositioninginthebrowser.Validvaluesofwmodearewindow,opaque,andtransparent.SettowindowtoplaytheSWFinitsownrectangularwindowonawebpage.Settoopaquetohideeverythingonthepagebehindit.SettotransparentsothatthebackgroundoftheHTMLpageshowsthroughalltransparentportionsoftheSWFfile.Thiscanslowanimationperformance.TomakesectionsofyourSWFfiletransparent,youmustsetthealphapropertyto0.Tomakeyourapplicationsbackgroundtransparent,setthealphapropertyonthetagto0.Thewmodepropertyisnotsupportedinallbrowsersandplatforms.!IE6FF2.0:1,JOVE,IE7 - event.stopPropagation();event.cancelBubble=true;,IE7,2,TEXT,!,ContextMenuSelect.3,FLEX,=/rightclickmanager-source-lib-0.1.rarFLEX : .template.html view plaincopy to clipboardprint? 1. .as import com.siloon.plugin.rightClick.RightClickManager; view plaincopy to clipboardprint? 1. Event(name=rightClick,type=fla sh.events.ContextMenuEvent) 2. public class index 3. 4. 5. protected var rightClickRegisted:Boolean = false; 6. 7. public function index() 8. 9. super(); 10. 11. if (!rightClickRegisted) 12. 13. RightClickManager.regist(); 14. rightClickRegisted = true; 15. 16. try 17. 18. name = NameUtil.createUniqueName(this); 19. 20. catch (e:Error) 21. 22. 23. return; 24. 25. 26. 27. public override function toString() : String 28. 29. return NameUtil.displayObjectToString(this); 30. NavTabTree.addEventListener(RightClickManager.RIGHT_CLICK,rightClickHandler); view plaincopy to clipboardprint? 1. /* 2. * 3. * param event 4. * 5. */ 6. protected function rightClickHandler(event:ContextMenuEvent):void 7. 8. onRightClicked(event); 9. removeMenu(); 10. 11. menu = new Menu(); 12. menu = Menu.createMenu(this, createMenuItems(), false); 13. 14. menu.labelField=label 15. menu.variableRowHeight = true; 16. /menu.addEventListener(MenuEvent.ITEM_CLICK, menuItemClickHandler); 17. 18. var point:Point = new Point(mouseX,mouseY); 19. point = localToGlobal(point); 20. menu.show(point.x,point.y); 21. 22. /* 23. * Menu 24. * 25. */ 26. private function removeMenu():void 27. 28. if(menu!=null) 29. 30. menu.hide(); 31. /menu.removeEventListener(MenuEvent.ITEM_CLICK,menuItemClickHandler); 32. menu=null; 33. 34. 35. /* 36. * 37. * return Array 38. * 39. */ 40. private function createMenuItems():Array 41. 42. var menuItems:Array = new Array(); 43. var menuItem:Object; 44. 45. menuItem = new Object; 46. menuItem.label = ; 47. menuItem.action = clearAll; 48. menuItems.push(menuItem); 49. 50. menuItem = new Object; 51. menuItem.label = ; 52. menuItem.action = selectBackImage; 53. menuItems.push(menuItem); 54. 55. return menuItems; 56. 57. /* 58. * TreeItem 59. * param e 60. * 61. */ 62. private function onRightClicked(e:ContextMenuEvent):void 63. 64. 65. 66. var rightClickItemRender:IListItemRenderer; 67. 68. var rightClickIndex:int; 69. 70. if(e.mouseTarget is IListItemRenderer) 71. 72. rightClickItemRender = IListItemRenderer(e.mouseTarget); 73. 74. else if(e.mouseTarget.parent is IListItemRenderer) 75. 76. rightClickItemRender = IListItemRenderer(e.mouseTarget.parent); 77. 78. 79. 80. 81. 82. if(rightClickItemRender != null) 83. 84. rightClickIndex = NavTabTree.itemRendererToIndex(rightClickItemRender); 85. 86. if(NavTabTree.selectedIndex != rightClickIndex) 87. 88. NavTabTree.selectedIndex = rightClickIndex; 89. 90. 91. 92. 93.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 商务谈判实战模拟高级文秘面试技巧训练
- 幼儿园教师面试常见考点指南
- 幼儿园教师职业规划与成长指导
- 扶贫项目组长述职报告
- 库存分析师库存管理软件操作指南
- 2025 小学二年级数学下册图形运动(设计对称图案)课件
- 家政行业面试常见问题解析
- SAP合并感染患者个体化治疗方案的制定流程
- 影视编导工作计划及剧本创作方案
- 护理行业趋势分析职业素养提升与职业规划实战案例样本
- 新版入团志愿书表格(含申请书范本)
- 英语A级历年真题及答案-英语学习技巧
- 滤池操作手册
- 团队境内旅游合同
- 在中学教代会上的财务工作报告(精选多篇)-教代会财务工作报告
- 小学音乐嘎达梅林
- 中国智能电动汽车热管理赛道研究报告
- 吸附处理技术
- 小学四年级口算题大全(10000道)
- 监理公司-见证取样登记台帐
- 钢构件包装作业指导书
评论
0/150
提交评论