zoukankan      html  css  js  c++  java
  • as3 右键版权类

    /**
    * Description 版权所有2006@qz http://www.quick35.com
    * @author crlnet
    * @version 0.1
    * @discription:右键版权类;
    */
    package crlclr.ui{
    	import flash.events.*;
    	import flash.ui.ContextMenu;
    	import flash.ui.ContextMenuBuiltInItems;
    	import flash.ui.ContextMenuItem;
    	
    	public class QcontextMenu{
    		
    		private var customItems:Array;
    		public var Qmenu:ContextMenu;
    		
    		/**
    		 * 用法:this.contextMenu=(new QcontextMenu()).Qmenu;
    		 */
    		
    		public function QcontextMenu () {
    			bulid();			
    		}
    		
    		function bulid(){
    			
    			Qmenu=new ContextMenu();
    			Qmenu.hideBuiltInItems();
    			var a:ContextMenuItem = new ContextMenuItem ("技术支持-乾庄");
    			a.separatorBefore = true;
    			a.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuHandler);
    			
    			Qmenu.customItems.push (a);
    			a = new ContextMenuItem ("联系客服");
    			a.separatorBefore = true;
    			Qmenu.customItems.push (a);
    			a.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuHandler);
    			
    			a = new ContextMenuItem ("Go Full Screen");
    			Qmenu.customItems.push (a);
    			a.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuHandler);
    			
    			a = new ContextMenuItem ("Exit Full Screen");
    			Qmenu.customItems.push (a);
    			a.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuHandler);
    
    			
    			//Qmenu.addEventListener(ContextMenuEvent.MENU_SELECT,menuHandler);
    			
    		}
    		
    		function menuHandler (event:Event) {
    			switch(event.target.caption){
    				case "":
    					break;
    				default:
    					trace(event.target.caption);
    					break;
    			}
    		}
    	}
    }
    

      

  • 相关阅读:
    HTML 页面的 批量删除的按钮
    HTML 选择器
    ....
    java 反射机制
    插件库
    向上滚动
    浮动元素定位float
    中文字体对应的英文名称
    echarts入门教程
    ie9浏览器window.openbug
  • 原文地址:https://www.cnblogs.com/dt1991/p/12768072.html
Copyright © 2011-2022 走看看