?? copyright.as.svn-base
字號:
?/*
*鼠標右鍵
*使用方法
*import com.DMH2002.copyRight
*var cr:copyRight=new copyRight(this)
*/
package com.dmh2002.util{
import flash.ui.*;
import flash.display.*;
import flash.net.*;
import flash.events.ContextMenuEvent;
public class CopyRight {
private var myName:String="作者:DMH2002";
private var myUrl:String="http://www.08baby.com";
//
private var myCompanyName:String="版權:蘆葦網(wǎng)";
private var myCompanyUrl:String="http://www.ruvita.com";
//
private var target:InteractiveObject;
//
public function CopyRight(target:InteractiveObject) {
this.target=target;
this.removeAndAddItem();
}
private function removeAndAddItem():void {
var myContextMenu = new ContextMenu();
var item1:ContextMenuItem=new ContextMenuItem(myName);
var item2:ContextMenuItem=new ContextMenuItem(myCompanyName);
myContextMenu.hideBuiltInItems();
myContextMenu.customItems.push(item1);
myContextMenu.customItems.push(item2);
target.contextMenu=myContextMenu;
item1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, item1SelectHandler);
item2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, item2SelectHandler);
}
private function item1SelectHandler(e:ContextMenuEvent):void {
navigateToURL(new URLRequest(myUrl),"_blank");
}
private function item2SelectHandler(e:ContextMenuEvent):void {
navigateToURL(new URLRequest(myCompanyUrl),"_blank");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -