0 Replies - 1020 Views - Last Post: 25 January 2007 - 07:23 AM

#1 reyco1  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 20-March 05

Simple Tool Tip

Posted 25 January 2007 - 07:23 AM

Description: place prototype in the first frame A simple tool tip
MovieClip.prototype.toolTip = function(str:String) {
     format = new TextFormat();
     format.font = "verdana";
     format.size = 9;
     format.color = 0x14444D;
     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 = 0x000000;
          _root.tip.setTextFormat(format);
     };
     this.onRollOut = function() {
          _root.tip.removeTextField();
     };
};

/////////USAGE/////////////////////////////////////////////////

myMC.toolTip("Hi there");



Is This A Good Question/Topic? 0
  • +

Page 1 of 1