(欢迎转载 ^ ^,但请写上出处,和保留到本文的超链接,本文的链接是:
http://www.kingda.org/archives/kingda/2006/05/ktooltipbeta.html#more )
主要的代码在5月1日前就写的差不多了,但一直回来懒得写帮助和作例子。^ ^
今天看到aw在Blueidea的回帖,心中大惭,晚上吃完饭后,立马做到现在搞定。
目前发布版本是0.5Beta。
主要特色:
1.使用简单,管理大量tooltips方便。为从外部xml导入tooltips带来极大方便。适合大项目。
2.支持V2组件的Tooltip显示,尤其是特殊组件 TextArea,Combobox等
3.支持MovieClip的Tooltip显示,原有onRollOver功能正常保留.
4.四角落判断
5.极其容易更换Tooltip皮肤。
文件下载&使用手册如下:
下载地址:
点击下载
安装方法请参考:
http://www.kingda.org/archives/kingda/2006/04/flash.html#more
特色 Features:
支持V2组件和剪辑,不覆盖原有的onRollOver函数,皮肤更换简单,支持html格式 tooltip,低CPU耗用。
a. support UIComponent and MovieClip
b. preserve the origin onRollOver event.
c. very easy to customize Tooltip skin, even to a Flash beginner.
d. support html tooltips.
e. optimized for low CPU consuming.
Instructions:
1 When installed, Drag the KToolTip component from the component panel into the library of your fla file.
2 write “import org.kingda.tools.KToolTip;” at the first line of the frame. or at the first line of your class file.
3 if you want make a tooltip for a movieclip or UIComponent. just write
KToolTip.add(yourmovieclip, "your tooltip");
4 Test movie, you got it.
If you want to donate, click here.
帮助:
1 拖动KToolTip组件到库中
2 在fla文件第一幀写上 import org.kingda.tools.KToolTip; 如在类class中使用,在第一行写import org.kingda.tools.KToolTip;写一次即可。
3 對组件UIComponent或者MovieClip加Tooltip的話,只要写
KToolTip.add(组件或MovieClip名称,“ToolTip内容”);
如何定制皮肤
![]()
a.根据图片提示创建一个 皮肤mc,设置好linkID.
b.要换皮肤时,打
KToolTip.setup (SkinMovieClipLinkageID, true, 100);
c. 搞定.
皮肤MC例子:
下载Tooltips皮肤MC例子
其他API § other APIs:
//参数: 皮肤MC的链接ID,是否显示Tooltip,Tooltip的Alpha值
KToolTip.setup (SkinMovieClipLinkageID:String, isEnable:Boolean, TooltipsAlpha:Number)
//参数: 要添加tooltip的MC引用,tooltip的字符串值,(支持html)
//修改tooltip也是用这个,会自动覆盖
KToolTip.add(targetMovieClip:MovieClip, toolTip:String)
//删除
KToolTip.remove(targetMovieClip:MovieClip)
//重置
KToolTip.reset()
//trace all tips in OutPut panel, and return an array of Objects, Array[i].mc_target:MovieClip, Array[i].mc_str:String
KToolTip.getAllTips()
www.kingda.org
e-mail:kingda1980@yahoo.com
note:
If you use KTooltip, a credit mc will show at the bottom of your swf about a few seconds.
If you want no_credit_mc version, please mail me : kingda1980@yahoo.com





Comments (14)
如此好东西居然没人顶-。-
Posted by Awflasher | May 16, 2006 2:44 PM
Posted on May 16, 2006 14:44
hi, aw, 我也来自顶一下,呵呵。
我把这篇文章的English版发到Ultrashock.com上去了。
http://forums.ultrashock.com/forums/showthread.php?threadid=81392
上面有Component版主CodeMonkey还有一些flash同道的讨论。还是有不少人喜欢的。开心 ^^
Posted by 黑羽 | May 17, 2006 9:38 AM
Posted on May 17, 2006 09:38
好东西,谢谢
Posted by realonlyjj | May 19, 2006 10:44 AM
Posted on May 19, 2006 10:44
2 在fla文件第一幀写上 import org.kingda.tools.KToolTip; 如在类class中使用,在第一行写import org.kingda.tools.KToolTip;写一次即可。
---------------------
好像是org.kingda.tools.KToolTips
少了个"S"
Posted by realonlyjj | May 19, 2006 4:57 PM
Posted on May 19, 2006 16:57
使用KToolTip.add(组件或MovieClip名称,“ToolTip内容”);
时,add在发布时被当成是运算符而报错
Posted by realonlyjj | May 19, 2006 5:01 PM
Posted on May 19, 2006 17:01
不对.....改成KToolTips也加载不了了,现在是一个文件里能加载另一个却不行.......也许是因为我装的是2004?
Posted by realonlyjj | May 19, 2006 5:21 PM
Posted on May 19, 2006 17:21
AS2.0,MX 2004可以正常使用的。你要注意啊,如果你是在timeline里面使用:比如说你在第三帧&第五帧的actions里面都用到了
KToolTip.add(name, "str"),那么该帧的actions里面第一行最好都要写import org.kingda.tools.KToolTip;
Posted by 黑羽 | May 19, 2006 9:51 PM
Posted on May 19, 2006 21:51
是个好东东,但是请问一下,在使用这个组件以后怎么要在动画上加个LOGO啊?
可以把这个LOGO去掉吗?
Posted by ishowing | May 22, 2006 1:48 PM
Posted on May 22, 2006 13:48
不是logo,是一个作品credit mc。署名用的。 :)
应该不碍事吧,只有两三秒钟,而且在页面底端。
Posted by 黑羽 | May 23, 2006 11:04 PM
Posted on May 23, 2006 23:04
怎么我做的这个存活时间好长啊?
那个署名的东西出来就不消失了??
Posted by ishowing | May 24, 2006 11:26 AM
Posted on May 24, 2006 11:26
æ™•ï¼Œç”¨ä½ è¿™ä¸ªç»„ä»¶è¿˜è¦åŠ ä½ logo
Posted by vkt | February 7, 2007 3:02 PM
Posted on February 7, 2007 15:02
运气不好?
Posted by 黑羽 | February 9, 2007 1:18 AM
Posted on February 9, 2007 01:18
呵呵..我也写过这样的Tips, 不过不是组件, 是一个函数而已...嘻嘻..
Posted by [ YoungBoy ] | May 21, 2007 11:56 AM
Posted on May 21, 2007 11:56
好漂亮的blog!
Posted by 四川旅游 | June 7, 2007 11:01 AM
Posted on June 7, 2007 11:01