This content has been marked as final.
Show 3 replies
-
-
2. Re: hover captions
ltdesign1 Oct 25, 2007 3:41 PM (in response to ltdesign1)Sorry, kglad...I don't know if it is as2 or as3. I have pasted the code below...perhaps you can tell which it is written in:
b1.onRollOver = function() {
captionFN(true, "E-Mail!", this);
this.onRollOut = function() {
captionFN(false);
};
};
b2.onRollOver = function() {
captionFN(true, "Portable Devices", this);
this.onRollOut = function() {
captionFN(false);
};
};
b3.onRollOver = function() {
captionFN(true, "Security", this);
this.onRollOut = function() {
captionFN(false);
};
};
b4.onRollOver = function() {
captionFN(true, "Regional Settings", this);
this.onRollOut = function() {
captionFN(false);
};
};
b5.onRollOver = function() {
captionFN(true, "Home Networking", this);
this.onRollOut = function() {
captionFN(false);
};
};
b6.onRollOver = function() {
captionFN(true, "Add/Remove Programs", this);
this.onRollOut = function() {
captionFN(false);
};
};
captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = captionText;
cap._width = 7*cap.desc.text.length;
cap._alpha = 75;
//
if ((bName._width+bName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
-
3. Re: hover captions
kglad Oct 25, 2007 6:09 PM (in response to ltdesign1)that's as2. in your rollover methods, define a setTimeout() that will trigger a caption to appear after the designated time. in your rollout methods, clear the setTimeout().