# MX: Advanced(?) Stuff: Dynamic "ToolTip" Display for Dynamic MCs

**URL:** https://forum.kirupa.com/t/mx-advanced-stuff-dynamic-tooltip-display-for-dynamic-mcs/158840
**Category:** Uncategorized
**Created:** [August 12, 2005, 8:41am UTC](https://forum.kirupa.com/t/mx-advanced-stuff-dynamic-tooltip-display-for-dynamic-mcs/158840 "2005-08-12T08:41:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![CEOofAEP](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@CEOofAEP](https://forum.kirupa.com/u/CEOofAEP)
#### Post date: [August 12, 2005, 8:41am UTC](https://forum.kirupa.com/t/mx-advanced-stuff-dynamic-tooltip-display-for-dynamic-mcs/158840/1 "2005-08-12T08:41:22Z")

</div>

_I added a note-formed description of what I need to happen. See post #5._

* * *

SOS ^^;

This is kind of a brainteaser- I don’t even know if it’s possible to make it in flash (but that usually doesn’t mean much- since I don’t know that much :D):

Here’s the deal:  
I am using a function to dynamically create instances (duplicateMovieClip) of MCs to pose as “icons”, kind of. The original MC that is copied has the following AS in it (which works):

```auto
on (rollOver) {
    _root.switch_io = 1;
    _root.caption._width = 35;
    _root.caption.variable_txt = "Text";
}
on (rollOut) {
    _root.switch_io = 0;
    _root.caption.variable_txt = " ";
}

```

Now comes the problem. Every MC copy / instance should display a different text on RollOver. See the code in line 4 where it says \>\> _\_root.caption.variable\_txt = “Text”;_ \<\<… that “Text” should be different for each MC.

I was thinking that maybe while copying the MCs to also create & set distinct root-variables for each of them… then assign an “onRollOver” to the MC copy (also while creating it) that takes that value from the distinct root-variable and pushes it into a static root-variable… and that static root variable is then read and displayed by the actual “on (rollOver)” of the original MC.  
This is the function I assign to the MC instance, just for testing:

```auto
var smc = eval("_root.distinct_MCname");
var smct = eval("_root.distinct_MCname_txt");
smct = "Some Random Text";
smc.onRollOver = function() {
    _root.subtxt = smct;
};

```

I then added the line

```auto
trace(_root.subtxt);

```

to the “on (rollOver)” of the main MC (the one that is copied) for testing.

But even though I give each MC (“smc” and it’s root-variable, “smct”) a different name, the value that is returned is always the last value that was processed by the function.  
Any ideas why that is or what I am doing wrong? Am I thinking too complicated? or not complicated enough?  
I also tried directly putting the “caption.words = smct;” into the onRollOver I assign during duplication of the clip (second code example) but that always sets the same (last) value, too.

_dies_ :wasted:
