# A value in an array as a color?

**URL:** <https://forum.kirupa.com/t/a-value-in-an-array-as-a-color/282470>\
**Category:** Uncategorized\
**Created:** [February 22, 2009, 7:26pm UTC](https://forum.kirupa.com/t/a-value-in-an-array-as-a-color/282470 "2009-02-22T19:26:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyberpunk](https://avatars.discourse-cdn.com/v4/letter/c/eada6e/32.png) [@cyberpunk](https://forum.kirupa.com/u/cyberpunk)\
**Post date:** [February 22, 2009, 7:26pm UTC](https://forum.kirupa.com/t/a-value-in-an-array-as-a-color/282470/1 "2009-02-22T19:26:21Z")

</div>

forgive me if i couldn’t explain it on title.  
i have an assignment and i’m trying to execute it in flash.  
i use laco tween. i have an xml file and it has captions like;

```auto
<student>
  <name>arif amele</name>
  <rbir>0x170375</rbir>
  <riki>0x506545</riki>
</student>

<student>
 <name>galip sevilmez</name>
 <rbir>0x004E2</rbir>
 <riki>0x763456</riki>
 </student>

```

then i pushed each of these values into different arrays.  
these rbir and riki are rgb color codes but i cant use them still.  
i can write down the “name” captions into an emptyMovieClip using createTextField.  
but when i try;

```auto
for(i=0;i<ogr.length;i++) {
  _root["ad"+i].onRollOver = function(){
    _root.kare.colorTo(rbir*,1);
    _root.kare2.colorTo(riki*,1);
  }
}

```

it doesn’t work.  
what is wrong?
