# Two part variable name? (mx2004)

**URL:** <https://forum.kirupa.com/t/two-part-variable-name-mx2004/250787>\
**Category:** flash\
**Created:** [February 1, 2008, 2:02pm UTC](https://forum.kirupa.com/t/two-part-variable-name-mx2004/250787 "2008-02-01T14:02:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matzi](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@Matzi](https://forum.kirupa.com/u/Matzi)\
**Post date:** [February 1, 2008, 2:02pm UTC](https://forum.kirupa.com/t/two-part-variable-name-mx2004/250787/1 "2008-02-01T14:02:23Z")

</div>

Okay so I am trying to make a crappy song player that lists the songs on stage using strictly code. My key problem is getting text to display the names of the songs. It doesn’t seem to like 2 part variables. Here is what I have. The red seems to be where the problem is at, the blue is what I am essentially trying to do. The fla is at the bottom.

```auto
songArray = new Array("song1", "song2", "song3")
onLoad = function () {
    for(i=0;i<3;i++){
        a="myText"
        attachMovie("song", "song"+i,i)
        _root["song"+i]._x=275;
        _root["song"+i]._y=125+(i*_root["song"+i]._height);
        _root["song"+i].createTextField("songNameMc"+i, i, _root["song"+i]._x,
_root["song"+i]._y, _root["song"+i]._width, _root["song"+i]._height)
       
        [COLOR=Red][COLOR=Black]_root["song"+i]["songNameMc"+i].variable =[/COLOR] a+i[COLOR=Black]
         [COLOR=Blue](a+i)=songArray*[/COLOR] 
[/COLOR][/COLOR]         
    }
}

```
