# Dynamically addressing movieclip

**URL:** https://forum.kirupa.com/t/dynamically-addressing-movieclip/148150
**Category:** Uncategorized
**Created:** [May 17, 2005, 1:26pm UTC](https://forum.kirupa.com/t/dynamically-addressing-movieclip/148150 "2005-05-17T13:26:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dualaud](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@dualaud](https://forum.kirupa.com/u/dualaud)
#### Post date: [May 17, 2005, 1:26pm UTC](https://forum.kirupa.com/t/dynamically-addressing-movieclip/148150/1 "2005-05-17T13:26:46Z")

</div>

i have this on my buttons (movieclips):

on (rollOver) {  
name=this.\_name;  
path=this.\_target;  
\_root.push (name, path);  
}

on the timeline i have the function:

\_root.push = function (name, path){  
trace(name);  
name.gotoAndPlay(“over”);  
}

on rollOver i want to dynamically pass a movieclips name to a function which controls that the movieclip should goto its frame named “over”, but i cant get the adressing to work.

if i trace the variable “name” in the example it gives me the moviename correctly. so i guess my syntax is wrong.  
the function doesnt work with the path variable either.

i know this might be a stupid question. dont mind me, i’m a noob… 😜

thanks for your help,  
dual
