Hi there,
New here and generally newer to flash. Have done some before but am now editing my offices webpage and I am having a hard time with the loadmovie concept.
I am interested in adding hovering text over an image that is added into a main file through loadmovie and a target clip. I used the Kirupa tutorial on making hover text and it works when run alone. Once added through loadmovie I get nothing.
Now I am sure that it must be a _parent or _root issue but it has been a long time since I used actionscript and I must admit I am a little rusty and confused.
I am using the following script for the hover text:
b1.onRollOver = function() {
captionFN(true, “E-Mail!”, 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;
}
};
stop();
My main file has the following script in frame 1:
{
loadtarget.loadMovie( “button.swf” )
}
When it loads I intially get my hover box on the screen, when I run my cursor over the button the text appears but when I rollout it disappears to never return again.
It also never follows the cursor.
Any suggestions besides hire a web designer…haha (?)