ToolTipManagerImplのコードを見てみると、あなたの答えが得られます。ここでcreateToolTip
機能は、ツールチップを作成する方法は次のとおりです。
public function createToolTip(text:String, x:Number, y:Number,
errorTipBorderStyle:String = null, context:IUIComponent = null):IToolTip{
var toolTip:ToolTip = new ToolTip();
var sm:ISystemManager = context ? context.systemManager as ISystemManager:
ApplicationGlobals.application.systemManager as ISystemManager;
sm.topLevelSystemManager.addChildToSandboxRoot(
"toolTipChildren", toolTip as DisplayObject);
if (errorTipBorderStyle){
toolTip.setStyle("styleName", "errorTip");
toolTip.setStyle("borderStyle", errorTipBorderStyle);
}
toolTip.text = text;
sizeTip(toolTip);
toolTip.move(x, y);
// Ensure that tip is on screen?
// Should x and y for error tip be tip of pointy border?
// show effect?
return toolTip as IToolTip;
}
だからあなたの答えは次のとおりです。
はcreateToolTip機能の独自の実装を使用して独自のユーティリティクラスを作成します。アドビの実装と変更からすべてのコードをコピーしてください。
var toolTip:ToolTip = new ToolTip(); -> var toolTip:ToolTip = new HTMLToolTip();
あなたが言及したページのコンポーネントを使用してください。
PS:sizeTip
の機能もコピーする必要があります。
出典
2010-12-31 12:13:03
2DH