# Instace name question

**URL:** <https://forum.kirupa.com/t/instace-name-question/184740>\
**Category:** flash\
**Created:** [April 7, 2006, 11:38am UTC](https://forum.kirupa.com/t/instace-name-question/184740 "2006-04-07T11:38:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juduth](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/juduth/32/2335_2.png) [@Juduth](https://forum.kirupa.com/u/Juduth)\
**Post date:** [April 7, 2006, 11:38am UTC](https://forum.kirupa.com/t/instace-name-question/184740/1 "2006-04-07T11:38:05Z")

</div>

[levTextSpace from [URL=“http://www.levitated.net”]www.levitated.net](http://www.levitated.net/daily/levTextSpace.html) It´s one of my favourite Flash animations, I’ve been having a look at it and I wonder how to make those buttons usefull. The debug code is huge and when I find the instance name for each button, I realize that those are only variables. Has anybody a clue??

---

<div class="post-metadata">

**Author:** ![arriba](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@arriba](https://forum.kirupa.com/u/arriba)\
**Post date:** [April 7, 2006, 5:43pm UTC](https://forum.kirupa.com/t/instace-name-question/184740/2 "2006-04-07T17:43:32Z")

</div>

take a look, may be you did it, inside the SpaceWord MC, in the SpaceWord function - onPress put this:

**trace(this.\_parent.\_name)**

This way you will know the name of the item you are pressing. Names go form “word” to “word(number of items on the array)” ok?

If you want to make diferent links (getURLS) to the items, you could do this in the \_root of the movie:

Look now inside the “for”:

```auto
nombre = "word"+String(depth++);

```

You realise this is the way the items are named (nombre in spanish is name)

So, if you want the “word” link to “[http://www.kirupa.com](http://www.kirupa.com)”??? and so on with the others items…

Add a variable in the root (outside the for!!) like this:

```auto
word_link = "http://www.kirupa.com"

```

And add inside the SpaceWord MC this in the "**this.btnSquare.onPress = function()"**

```auto
trace(_root[this._parent._name+"_link"]);
        getURL(_root[this._parent._name+"_link"], _blank);

```

The link is defined in the “\_root”, “this.\_parent.\_name” is the name of the item pressed, and “\_link” is the rest of the name of the variable definde in the \_root as i said first.

Add as many links or what you want depending the numbers of the intems in the array:

```auto
word1.link = "http://www.kirupa.com"
word2.link = "http://www.kirupa.com"
word2.link = "http://www.kirupa.com"
.
.
.
.

```

Good luck
