这几天csdn的blog又出问题了

这几天csdn的blog又出问题了, 唉. 今天去买个域名, 尽快解决这些事情.
推荐小贝的ToolTip组件下载: http://f358.com/blog/koaqiu/articles/223.html

再来一个!! 张俊钦朋友的ToolTip

class ToolTip {
        private static var tipHoldMC:MovieClip;
        private static var myTextFormat:TextFormat;
        private static var msg:String;
        public static function setToolTip(target:MovieClip, dummyMsg:String):Void {
                target.onRollOver = function() {
                        msg = dummyMsg;
                        tipHoldMC = target._parent.createEmptyMovieClip("dummMC", 1000);
                        tipHoldMC.createTextField("tipTxt", 1, 0, 0, 0, 0);
                        tipHoldMC.tipTxt.html = true;
                        tipHoldMC.tipTxt.htmlText = msg;
                        tipHoldMC.tipTxt.selectable = false;
                        tipHoldMC.tipTxt.autoSize = true;
                        tipHoldMC.tipTxt.background = true;
                        tipHoldMC.tipTxt.border = true;
                        tipHoldMC.tipTxt.borderColor = 0x000000;
                        tipHoldMC.tipTxt.backgroundColor = 0xFFFFEE;
                        with (tipHoldMC) {
                                beginFill(0x999999, 100);
                                moveTo(2, 2);
                                lineTo(tipTxt._width+2, 2);
                                lineTo(tipTxt._width+2, tipTxt._height+2);
                                lineTo(2, tipTxt._height+2);
                                lineTo(2, 2);
                                endFill();
                        }
                        (target._parent._xmouse+tipHoldMC._width)<Stage.width ? tipHoldMC._x=target._parent._xmouse : tipHoldMC._x=Stage.width-tipHoldMC._width;
                        var boundObject:Object = target.getBounds(target._parent);
                        (boundObject.yMin-target.height-2)>0 ? tipHoldMC._y=boundObject.yMin-target.height-2 : tipHoldMC._y=boundObject.yMax+2;
                };
                target.onRollOut = target.onPress=target.onReleaseOutside=destroyTip;
        }
        public static function destroyTip():Void {
                removeMovieClip(tipHoldMC);
        }
}

效果图: http://www.flash8.net/bbs/UploadFile/2004-11/20041127145553409.swf








评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值