# Simple mod: hover caption in movie clip?

**URL:** <https://forum.kirupa.com/t/simple-mod-hover-caption-in-movie-clip/211854>\
**Category:** Uncategorized\
**Created:** [January 5, 2007, 8:12pm UTC](https://forum.kirupa.com/t/simple-mod-hover-caption-in-movie-clip/211854 "2007-01-05T20:12:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccbread](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@ccbread](https://forum.kirupa.com/u/ccbread)\
**Post date:** [January 5, 2007, 8:12pm UTC](https://forum.kirupa.com/t/simple-mod-hover-caption-in-movie-clip/211854/1 "2007-01-05T20:12:49Z")

</div>

hi,  
i’m new here. thanks for looking at my question. it similar to previous questions but after much searching i can not find the answer so i am posting my version of the question.

i am trying to use the excellent hover caption effect in my movie. the buttons i want to put the captions on are inside a movie clip named mcRobot. so i tried to modify all the paths to go into the mc…but not working.

here is original code from tutorial and then the one i try. basically i put “mcRobot.” before most of the paths where i think it should go.

does anyone have a version already modified to put into an mc?

THANK YOU!

original code:

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;  
}  
};

so i try this:

mcRobot.b1.onRollOver = function() {  
captionFN(true, “E-Mail!”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
mcRobot.b2.onRollOver = function() {  
captionFN(true, “Portable Devices”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
mcRobot.b3.onRollOver = function() {  
captionFN(true, “Security”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
mcRobot.b4.onRollOver = function() {  
captionFN(true, “Regional Settings”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
mcRobot.b5.onRollOver = function() {  
captionFN(true, “Home Networking”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
mcRobot.b6.onRollOver = function() {  
captionFN(true, “Add/Remove Programs”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
captionFN = function (showCaption, captionText, bName) {  
if (showCaption) {  
\_root.mcRobot.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;  
}  
mcRobot.hoverCaption.onEnterFrame = function() {  
mcRobot.cap.\_x = \_root.\_xmouse+xo;  
mcRobot.cap.\_y = \_root.\_ymouse+yo;  
mcRobot.cap.\_visible = true;  
};  
} else {  
delete hoverCaption.onEnterFrame;  
mcRobot.cap.\_visible = false;  
}  
};
