# Targetting attached movieclip question

**URL:** https://forum.kirupa.com/t/targetting-attached-movieclip-question/109540
**Category:** Uncategorized
**Created:** [May 6, 2004, 2:26pm UTC](https://forum.kirupa.com/t/targetting-attached-movieclip-question/109540 "2004-05-06T14:26:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![redg](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@redg](https://forum.kirupa.com/u/redg)
#### Post date: [May 6, 2004, 2:26pm UTC](https://forum.kirupa.com/t/targetting-attached-movieclip-question/109540/1 "2004-05-06T14:26:13Z")

</div>

[SIZE=2]

i have a problem adressing or targetting a attached mc

when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore???

hopefully a part of the code is gonna explain the situation a litle better…

this piece works fine:

decrement and increment are two functions  
[COLOR=DarkSlateGray]/////////////////////////////////////////////////////////////////////////[/COLOR]

[COLOR=Navy]ThisItemNumber.onRollOver = function() {  
this.but1\_1.Decrement(50, 2);  
};  
ThisItemNumber.onRollOut = function() {  
this.but1\_1.Increment(100, 2);  
};[/COLOR]  
[COLOR=DarkSlateGray]//////////////////////////////////////////////////////////////////////[/COLOR]

[COLOR=Black]this doesnt work[/COLOR]  
[COLOR=DarkSlateGray]//////////////////////////////////////////////////////////////////////[/COLOR]

[COLOR=Navy]ThisItemNumber.onRollOver = function() {  
var WichButOver = [“but1\_”+this.numbr];  
this.WichButOver.Decrement(50, 2);  
trace(WichButOver);  
[/COLOR]  
[COLOR=DarkSlateGray]//trace = but1\_1 if you rollover but 1  
//trace = but1\_2 if you rollover but 2[/COLOR]  
[COLOR=Navy]};

ThisItemNumber.onRollOut = function() {  
var WichButOver = _root["but1_"+this.numbr];  
this.WichButOver.Increment(100, 2);  
trace(WichButOver); [/COLOR]

[COLOR=DarkSlateGray]//trace = but1\_1 if you rollover but 1  
//trace = but1\_2 if you rollover but 2[/COLOR]  
[COLOR=Navy]};[/COLOR][/SIZE]

hopefully yall know what i’m talking about…  
tnx in advance…

desperado redg
