# Hover captions—need some help

**URL:** https://forum.kirupa.com/t/hover-captions-need-some-help/42220
**Category:** flash
**Created:** [February 6, 2004, 4:08pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220 "2004-02-06T16:08:12Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![alicia](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@alicia](https://forum.kirupa.com/u/alicia)
#### Post date: [February 6, 2004, 4:08pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/1 "2004-02-06T16:08:12Z")

</div>

WHEN VIEWING THE SWF, ROLL OVER THE COUNTIES IN THE UPPER LEFT CORNER AND THE ONE IN THE UPPER RIGHT CORNER…ONLY THE ONE IN THE UPPER RIGHT WORKS LIKE IT SHOULD.

The buttons use two different hover caption movie clips, one for buttons on the left, and one for buttons on the right. In the first frame of the root I have these actions:  
startDrag(\_root.captionleft, true);  
startDrag(\_root.captionright, true);

And to make the captions visible only when I roll over a button, I’ve attached this action:  
onClipEvent (enterFrame) {  
if (\_root.x == 1) {  
this.\_alpha = 50;  
} else {  
this.\_alpha = 0;  
}  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 5:48pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/2 "2004-02-06T17:48:45Z")

</div>

You can only drag one mc at a time.  
Try this  
[AS]var mid = Stage.width/2;  
\_root.onMouseMove = function() {  
if (\_root.\_xmouse\<=mid) {  
startDrag(\_root.captionleft, true);  
} else {  
startDrag(\_root.captionright, true);  
}  
};  
[/AS]

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 5:51pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/3 "2004-02-06T17:51:20Z")

</div>

I don’t think its possible to drag 2 mcs at once.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 5:52pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/4 "2004-02-06T17:52:29Z")

</div>

darn it, i hate it when that happens

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 5:55pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/5 "2004-02-06T17:55:32Z")

</div>

I know the feeling;)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 6:01pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/6 "2004-02-06T18:01:47Z")

</div>

You can drag muliple movieclips using this prototype by Senocular 🙂

[http://proto.layer51.com/d.aspx?f=845](http://proto.layer51.com/d.aspx?f=845)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 6:23pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/7 "2004-02-06T18:23:35Z")

</div>

Thanks for that tip, Voets;)

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 7:46pm UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/8 "2004-02-06T19:46:09Z")

</div>

Thanks Scotty, but I think because there’s no clear line of left and right in my swf, the dividing the screen in half won’t work—but I can definitely use that other places, and thanks for that script, voets…assuming my dumb \*ss can figure that code out! 🙂

Do you guys think I can somehow find the position of the mouse and simply flip the comment bubble movie clip horizontally if it’s over on the right?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 3, 2004, 5:20am UTC](https://forum.kirupa.com/t/hover-captions-need-some-help/42220/9 "2004-08-03T05:20:06Z")

</div>

how would you modify this to have a left right and middle section or specify the width and heigth of a movie or area and then say what width is each?

> var mid = Stage.width/2;  
> \_root.onMouseMove = function() {  
> if (\_root.\_xmouse\<=mid) {  
> startDrag(\_root.captionleft, true);  
> } else {  
> startDrag(\_root.captionright, true);  
> }  
> };
