Zurück   Flashforum > Flash > Flash erweitern > Komponenten und SmartClips

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 04-08-2008, 08:55   #1 (permalink)
Neuer User
 
Registriert seit: Oct 2004
Beiträge: 11
Problem mit netTrek ToolTip

Hallo,


ich hatte mir mal vor Jahren ein ToolTip von netTrek als Komponente
in meine Flash-Seite eingebaut. Nur leider hat dieser ToolTip
ein Problem: immer wenn ich auf den Button klicke (und somit dem Link folge) und wieder auf die erste Seite zurückgehe, wird mir der Tooltip für einen bestimmten Zeitraum weiter angezeigt.
Auch wenn ich mit der Maus über einen neuen Button fahre und mir eigentlich ein neuer Tooltip angezeigt werden müsste.
Irgendwann geht's dann wieder: Der alte Tooltip (dessen Link ich gefolgt bin) verschwindet vom Mauszeiger und ich kann mir die neuen Tooltips ansehen.

Verstanden? ;-)

Die Komponente findet Ihr unten.
Hat jemand vielleicht eine Lösung, woran es liegt?


Dann habe ich nach einem neuen ToolTip gesucht und bin wieder auf
den von das von netTrek gestoßen:

http://www.flashforum.de/forum/showt...ettrek+tooltip


Nur wie kann ich diesen als Komponente in meinen Flash-Film einbauen?

Durch einfaches Copy+Paste im Aktionen-Fenster habe ich es nicht hinbekommen.
Und wo kann ich anschließend den Text etc. im ToolTip anpassen?

Leider sind seit der Erstellung meines Flash-Filmes schon ein paar Jahre vergangen und ich habe viel wieder vergessen.

Kann mir jemand von Euch weiterhelfen?


Danke und Gruß

Don





Hier mal die erste Komponente von netTrek mit dem Fehler:

_visible = false;

MovieClip.prototype.netTrek_square = function(r_width, r_height, fillColor, fillAlpha, linethickness, lineColor, lineAlpha, h_align, v_align) {
var w, h, c, a, t, lc, la, ha, va, l, x0, x1, x2, x3, y0, y1, y2, y3, ltca;
l = arguments.length;
ltca = true; w = r_width; h = r_height;
c = fillColor; a = fillAlpha;
if (l<9) {
if (typeof (arguments[4]) == "string" && typeof (arguments[5]) == "string") {
ltca = false; ha = arguments[4]; va = arguments[5];
} else {
t = linethickness; lc = lineColor; la = lineAlpha;
ha = h_align; va = v_align;
}
} else {
t = linethickness; lc = lineColor; la = lineAlpha;
ha = h_align; va = v_align;
}
ha = String(ha).toLowerCase().substr(0, 1);
va = String(va).toLowerCase().substr(0, 1);
if (ha == "l") { x0 = x3=0; x1 = x2=w; }
else if (ha == "r") { x0 = x3=-w; x1 = x2=0; }
else { x0 = x3=-w/2; x1 = x2=w/2; }
if (va == "t") { y2 = y3=0; y0 = y1=h; }
else if (va == "b") { y2 = y3=-h; y0 = y1=0; }
else { y2 = y3=-h/2; y0 = y1=h/2; }
var offSet = new Object()
offSet.x = x3
offSet.y = y3
with (this) {
clear();
if (ltca) lineStyle(t, lc, la);
beginFill(c, a); moveTo(x0, y0);
lineTo(x1, y1); lineTo(x2, y2); lineTo(x3, y3);
lineTo(x0, y0); endFill();
}
return offSet
};
//------------------------------------
MovieClip.prototype.netTrek_TTText = function(t, e, c, a, b, f, i, s, u) {
this.createTextField("ntttt", 1, 0, 0, 9, 9);
this.ntttt.autoSize = "left"; this.ntttt.multiline = true; this.ntttt.selectable = false;
this.ntttt.embedFonts = e; this.ntttt.text = t;
this.ntttt.textColor = c;
var ntttf = new TextFormat();
ntttf.align = a; ntttf.bold = b;
ntttf.color = ntttt.textColor;
ntttf.font = f; ntttf.italic = i;
ntttf.size = s; ntttf.underline = u;
this.ntttt.setTextFormat(ntttf);
};
//-------------------------------------------
Button.prototype.netTrek_toolTipp = MovieClip.prototype.netTrek_toolTipp = function (toolTippText, ttextEmbedFonts, ttextColor, ttextAlign, ttextBold, ttextFont, ttextItalic, ttextSize, ttextUnderline, ttfillColor, ttfillAlpha, ttlinethickness, ttlineColor, ttlineAlpha,showHand,distance,vertical_fit,horizon tal_fit){
if (typeof(this)=="movieclip"){
bound = this.getBounds(_root)
var nt_button = false
var nt_left = bound.xMin;
var nt_midd = bound.xMin+this._width/2
var nt_right = bound.xMax
var nt_top = bound.yMin
var nt_cent = bound.yMin+this._height/2
var nt_butt = bound.yMax
} else var nt_button = true
this.onRollOver = function () {
this.useHandCursor = showHand
createEmptyMovieClip("controller_n" ,9999)
controller_n.onMouseMove = function () {
_root.nt_tooltip.removeMovieClip();
if(vertical_fit=="auto"){
if(!nt_button) {
if (_root._xmouse >= nt_left && _root._xmouse < nt_midd) ha="r"
if (_root._xmouse >= nt_midd && _root._xmouse <= nt_right) ha="l"
}else ha="r"
}else ha = vertical_fit.toLowerCase().substring(0,1)
if(horizontal_fit=="auto") {
if(!nt_button) {
if (_root._ymouse >= nt_top && _root._ymouse < nt_cent) va="b"
if (_root._ymouse >= nt_cent && _root._ymouse <= nt_butt) va="t"
}else va="b"
}else va = horizontal_fit.toLowerCase().substring(0,1)
_root.createEmptyMovieClip("nt_tooltip",1000)
with (_root.nt_tooltip) {
_visible = false;
_root.nt_tooltip.netTrek_TTText (toolTippText, ttextEmbedFonts, ttextColor, ttextAlign, ttextBold, ttextFont, ttextItalic, ttextSize, ttextUnderline)
_root.nt_tooltip.pos = _root.nt_tooltip.netTrek_square (ntttt._width,ntttt._height,ttfillColor, ttfillAlpha, ttlinethickness, ttlineColor, ttlineAlpha,ha,va)
ntttt._x = _root.nt_tooltip.pos.x;
ntttt._y = _root.nt_tooltip.pos.y;
delete pos; _visible = true;
_x = (ha=="l") ? (_xmouse+distance) : (_xmouse-distance)
_y = (va=="b") ? (_ymouse-distance) : (_ymouse+distance)
}
}
controller_n.onUnload = function () {
_root.nt_tooltip.removeMovieClip();
controller_n.removeMovieClip()
}
}
this.onRollOut = function () {
_root.nt_tooltip.removeMovieClip();
controller_n.removeMovieClip()
}
}
_root.nt_tooltip.removeMovieClip();
_parent[_targetInstanceName].netTrek_toolTipp (toolTippText,toolTippTextEmbedFont,toolTippTextCo lor,toolTippTextAlign,toolTippTextBold,toolTippTex tFont,toolTippTextItalic,toolTippTextSize,toolTipp TextUnderline,toolTippFillColor,toolTippFillColorA lpha,toolTippLineThickness,toolTippLineColor,toolT ippLineColorAlpha,showHand,distance,vertical_fit,h orizontal_fit);
DonUrlaub ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist aus.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 11:19 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele