# Turn part of array into button

**URL:** <https://forum.kirupa.com/t/turn-part-of-array-into-button/206747>\
**Category:** Uncategorized\
**Created:** [November 10, 2006, 10:37pm UTC](https://forum.kirupa.com/t/turn-part-of-array-into-button/206747 "2006-11-10T22:37:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnkdrkluv](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jnkdrkluv](https://forum.kirupa.com/u/jnkdrkluv)\
**Post date:** [November 10, 2006, 10:37pm UTC](https://forum.kirupa.com/t/turn-part-of-array-into-button/206747/1 "2006-11-10T22:37:14Z")

</div>

i was wondering if there’s a way to change the last bit of the array ([name@place.com](mailto:name@place.com)) into a button with actionscript? or any other suggestions?

here’s a still of what it looks like:  
 ![](http://www.jsouza.com/contact.jpg)

```
 ActionScript Code:
 [FONT=Courier New][LEFT]contactInfo = [COLOR=#000000][[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]"Location"[/COLOR], [COLOR=#ff0000]"NW"[/COLOR] + [COLOR=#0000ff]newline[/COLOR] + [COLOR=#ff0000]"Portland, OR"[/COLOR] 
            + [COLOR=#0000ff]newline[/COLOR] + [COLOR=#ff0000]"97209"[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000000][[/COLOR][COLOR=#ff0000]"Telephone"[/COLOR], 
            [COLOR=#ff0000]"555.555.5555"[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000000][[/COLOR][COLOR=#ff0000]"Email"[/COLOR], [COLOR=#ff0000]"name@place.com"[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000]][/COLOR];

```

xPos = [COLOR=#000080]20[/COLOR];  
yPos = [COLOR=#000080]20[/COLOR];

[COLOR=#0000ff]for[/COLOR][COLOR=#000000]([/COLOR]i = [COLOR=#000080]0[/COLOR]; i\<contactInfo.[COLOR=#0000ff]length[/COLOR]; i++[COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]  
[COLOR=#0000ff]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“conBox”[/COLOR],[COLOR=#ff0000]“new”[/COLOR]+i, i, [COLOR=#000000]{[/COLOR][COLOR=#0000ff]\_x[/COLOR]: xPos, [COLOR=#0000ff]\_y[/COLOR]: yPos[COLOR=#000000]}[/COLOR][COLOR=#000000])[/COLOR];  
xPos += [COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“new”[/COLOR]+i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]\_width[/COLOR] + [COLOR=#000080]50[/COLOR];  
[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“new”[/COLOR]+i[COLOR=#000000]][/COLOR].[COLOR=#000080]head[/COLOR].[COLOR=#0000ff]text[/COLOR] = contactInfo[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] [COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR];  
[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“new”[/COLOR]+i[COLOR=#000000]][/COLOR].[COLOR=#000080]content[/COLOR].[COLOR=#0000ff]text[/COLOR] = contactInfo[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] [COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR];  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]
