Actionscript ike yapılmıs basit ama kulanıslı bir tooltip ornegi kulanımı cok kolay ve prototype oldugu ıcın kulanım kolaylıgı saglamıs …
MovieClip.prototype.toolTip = function(str:String) {
format = new TextFormat();
format.font = "verdana";
format.size = 9;
format.color = 0×14444D;
this.onRollOver = function() {
_root.createTextField("tip", 1, 0, 0, 0, 0);
_root.tip.text = str;
_root.tip._x = this._x;
_root.tip._y = this._y-20;
_root.tip.autoSize = "left";
_root.tip.background = true;
_root.tip.border = true;
_root.tip.selectable = false;
_root.tip.backgroundColor = "0xFFFFE1";
_root.tip.borderColor = 0×000000;
_root.tip.setTextFormat(format);
};
this.onRollOut = function() {
_root.tip.removeTextField();
};
};
Kulanım
myMC.toolTip("Hi there");
