# Values from External File

**URL:** https://forum.kirupa.com/t/values-from-external-file/270513
**Category:** flash
**Created:** [September 10, 2008, 5:01pm UTC](https://forum.kirupa.com/t/values-from-external-file/270513 "2008-09-10T17:01:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cangrejero](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@cangrejero](https://forum.kirupa.com/u/cangrejero)
#### Post date: [September 10, 2008, 5:01pm UTC](https://forum.kirupa.com/t/values-from-external-file/270513/1 "2008-09-10T17:01:40Z")

</div>

Is it possible to pass the values needed for “button\_label[x]” from an external file? How could I accomplish this? Any guidance is appreciated. Thanks!

```auto

stop();
contents_group.contents._visible = false;
contents_group.setMask( content_area );
contents_spacing = 5;
fm_button._visible = false;
button_label = new Array();
button_label[0] = "Home";
button_label[1] = "Messages";
button_label[2] = "Directors";
button_label[3] = "Materials";
button_label[4] = "Requests";
// a number of buttons in button_label array must be equal 
// to a number of frames inside "contents" movieclip
for( var i = 0; i < contents_group.contents._totalframes; i++ )
{
 fm_button.duplicateMovieClip("fm_button" + i, i);
 _root["fm_button" + i]._x = fm_button._x;
 _root["fm_button" + i]._y = fm_button._y+ i*30;
 _root["fm_button" + i].label_mc.label_txt = button_label*;
 _root["fm_button" + i].no = i;
 
 contents_group.contents.duplicateMovieClip("contents"+i, i);
 contents_group["contents"+i].gotoAndStop(i+1);
 contents_group["contents"+i]._x = contents._x;
 contents_group["contents"+i]._y = i * (contents_group.contents._height + contents_spacing);
 contents_group["contents"+i].contents_no = i;
}

```
