# Changing properties

**URL:** https://forum.kirupa.com/t/changing-properties/13879
**Category:** Uncategorized
**Created:** [February 19, 2003, 9:57am UTC](https://forum.kirupa.com/t/changing-properties/13879 "2003-02-19T09:57:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![thybalt](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@thybalt](https://forum.kirupa.com/u/thybalt)
#### Post date: [February 19, 2003, 9:57am UTC](https://forum.kirupa.com/t/changing-properties/13879/1 "2003-02-19T09:57:58Z")

</div>

I have this code:

* * *

## currPos=\_root.indicator.indicator;

currPos is a numeric value that I get from \_root.indicator.indicator.  
This value can be 1, 2, 3 or 4. It is random.

I then have this example if statement:

* * *

## if (\_root.score.notes1.pos==3) trace(“success”);

I want the numeric “1” from notes1.pos to be dependent on the value of currPos.

That is, if currPos=5, the statement will be:

* * *

## if (\_root.score.notes5.pos==3) trace(“succcess”);

I tried this:

if (\_root.score.notes[currPos].pos==3)  
… blah blah

but it does not work.  
I know the syntax is wrong but I just can’t figure out the right syntax.

Help please?  
Thank you all =D

---

<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 19, 2003, 10:17am UTC](https://forum.kirupa.com/t/changing-properties/13879/2 "2003-02-19T10:17:38Z")

</div>

Howdy…

Try this…

if (\_root.score[“notes” + currPos].pos == 3)

---

<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 19, 2003, 11:19am UTC](https://forum.kirupa.com/t/changing-properties/13879/3 "2003-02-19T11:19:38Z")

</div>

thanks cyanblue that worked perfect!😛

---

<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 19, 2003, 11:30am UTC](https://forum.kirupa.com/t/changing-properties/13879/4 "2003-02-19T11:30:09Z")

</div>

You’re very welcome… =)
