?? gllltooltip.as
字號:
package com.ll19.util {
import flash.display.MovieClip;
import flash.text.TextFieldAutoSize;
/**
* - GL'LL. -
*
* 工具提示類
*
* @author <a href="http://www.LL19.com/">LL19.com</a>
*
*/
public class GlllToolTip extends MovieClip {
var toolTips:MovieClip;
/**
* 建立提示工具影片
* @param tip 提示工具所處場景中的影片
* @param tool 提示工具所在的影片剪輯
*/
function GlllToolTip(tool:Object,tip:MovieClip) {
toolTips = tip;
var toolMC:MovieClip = new tool();
toolMC.ToolTip.text = " This my toolTip~ ";
toolMC.ToolTip.background = true;
toolMC.ToolTip.backgroundColor = "0xFFFFFF";
toolMC.ToolTip.textColor = "0x000000";
toolMC.ToolTip.autoSize = TextFieldAutoSize.CENTER;
toolMC.ToolTip.selectable = false;
toolMC.ToolTip.mouseEnabled = false;
toolMC.ToolTip.border = true;
toolMC.name = "toolTip";
toolTips.addChild(toolMC);
toolTips.x = 0;
toolTips.y = 0;
toolTips.visible = false;
}
/**
* 顯示提示工具
* @param datext 需要顯示的字符串
* @param x X坐標
* @param y Y坐標
* @param font black是黑底白色
*/
public function showTip(datext:String,x:Number,y:Number,font:String):void {
//TODO: font參數(shù)未實現(xiàn)
// if (font == "black") {
// MovieClip(this.toolTips.getChildByName("toolTip")).ToolTip.backgroundColor = "0x000000";
// MovieClip(this.toolTips.getChildByName("toolTip")).ToolTip.textColor = "0xCC000";
// }
MovieClip(this.toolTips.getChildByName("toolTip")).ToolTip.htmlText = datext;
this.toolTips.x = x;
this.toolTips.y = y;
this.toolTips.visible = true;
}
/**
* 隱藏提示坐標
*/
public function removeTip():void {
this.toolTips.visible = false;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -