home *** CD-ROM | disk | FTP | other *** search
- MovieClip.prototype.transAlpha = function(fin, accel, callback)
- {
- var _loc1_ = this;
- _loc1_.createEmptyMovieClip("mcAlpha",8426);
- var o = _loc1_;
- _loc1_.mcAlpha.onEnterFrame = function()
- {
- var _loc1_ = fin - o._alpha;
- if(Math.abs(_loc1_) <= 2)
- {
- o._alpha = fin;
- this.removeMovieClip();
- callback();
- }
- else
- {
- o._alpha = Math.round(o._alpha + _loc1_ / accel) + 1;
- }
- };
- };
- showToolTip = function(contenu)
- {
- i = 1;
- startTime = getTimer();
- this.attachMovie("tooltyp","tooltyp",600);
- tooltyp._visible = false;
- if(_xmouse < 260)
- {
- var _loc1_ = 10;
- }
- else
- {
- _loc1_ = - tooltyp._width - 10;
- }
- tooltyp._y = _ymouse - 20;
- tooltyp._x = _xmouse + _loc1_;
- tooltyp.chtexte.background = true;
- tooltyp.chtexte.backgroundColor = 16777215;
- tooltyp.chtexte.border = true;
- tooltyp.chtexte.borderColor = 0;
- tooltyp.chtexte.text = contenu;
- longeur = tooltyp.chtexte.textWidth;
- tooltyp.onEnterFrame = function()
- {
- curentTime = getTimer() - startTime;
- tooltyp.chtexte._width = 20 * i++;
- if(tooltyp.chtexte._width > longeur)
- {
- tooltyp.chtexte._width = longeur + 10;
- }
- if(curentTime > 500)
- {
- tooltyp._visible = true;
- tooltyp.transAlpha(100,3);
- }
- if(_xmouse < 260)
- {
- var _loc1_ = 10;
- }
- else
- {
- _loc1_ = - tooltyp._width - 10;
- }
- tooltyp._y = _ymouse - 20;
- tooltyp._x = _xmouse + _loc1_;
- };
- };
- hideToolTip = function()
- {
- tooltyp.removeMovieClip();
- delete tooltyp.onEnterFrame;
- tooltyp.transAlpha(0,2);
- tooltyp.texte = "";
- tooltyp.chtexte._width = 10;
- };
- _global.setToolTip = function(obj, s)
- {
- obj.onRollOver = function()
- {
- showToolTip(s);
- };
- obj.onRollOut = function()
- {
- hideToolTip("");
- };
- };
-