yes , this is what i have to do now ,
create a tips at "toolTipCreate" call back function
and change the position at the " toolTipShow" call back function .
but if we look deep into the code , you can see , the ToolTipManagerImpl already did the thingsmx_internal function showTimer_timerHandler(event:TimerEvent):void
// Make sure we still have a currentTarget when the timer fires.
we just change create a tips after the clasee already did in createTip();
and change the position after they already change the position in positionTip();
is the double work , isn't it?
so i don't think this is good solution.
Unfortunately it looks like that nobody is going to fix that bug in SDK (function createToolTip in http://opensource.adobe.com/svn/opensource/flex/sdk/branches/gumbo_beta2/frameworks/projec ts/framework/src/mx/managers/ToolTipManagerImpl.as). Some smart guy posted a kind of 'solution' on his blog http://www.benclinkinbeard.com/2008/07/simple-monkey-patch-to-fix-tooltipmanagertooltipcla ss/. His approach needs a patch in ToolTipManagerImpl.as. Unfortunately it works in Flex 3 and I couldn't get it work under Flex 4 b2. Maybe you are luckier than I am. Did you find any solution? Maybe it would be useful to me. My problem is very simple, get the two lines of code below to work. If somebody has an idea how to get this lines of code to work, please let me know. There is nothing wrong with the PanelToolTip class.
ToolTipManager.toolTipClass = PanelToolTip;
var myTip:PanelToolTip = ToolTipManager.createToolTip("asdf",10,10) as PanelToolTip;
Sorry for see the mail a little late. hope you already solve that problem.
my solution is same as the guy(http://blog.flexmonkeypatches.com/2008/09/10/flex-custom-tooltip-speech-bubble/) wrote in his blog.
and i think this is the only way right now
protected function button1_toolTipCreateHandler(event : ToolTipEvent) : void
var gameNormalToolTips : AnimationGameToolTips = new AnimationGameToolTips();
event.toolTip = gameNormalToolTips;
protected function button1_toolTipShowHandler(event : ToolTipEvent) : void
(event.toolTip as AnimationGameToolTips).setToolTipsPosition(event.target as UIComponent);
you have to listen for the tooltips create and show function , during the create function change the normal tooltip to yours
and in toolTipShow function change the position.
i also wrote an demo before( see in the attach ) sorry the demo is chaos and also have some Chinese word in it .
if it influence your reading please let me know.
ps: please only check for the
TestAnimationToolTips.mxlm and AnimationGameToolTips.as .
other code is not useful
TestTips.rar.zip 111.8 K