# Using Loaded Variables For Loading Images

**URL:** <https://forum.kirupa.com/t/using-loaded-variables-for-loading-images/92891>\
**Category:** Uncategorized\
**Created:** [October 22, 2003, 10:17pm UTC](https://forum.kirupa.com/t/using-loaded-variables-for-loading-images/92891 "2003-10-22T22:17:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![telekinesis](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@telekinesis](https://forum.kirupa.com/u/telekinesis)\
**Post date:** [October 22, 2003, 10:17pm UTC](https://forum.kirupa.com/t/using-loaded-variables-for-loading-images/92891/1 "2003-10-22T22:17:06Z")

</div>

[size=1] **Objective:** Load variables from a text file named [color=red]picData.txt[/color] into a movie clip on the root timelines with an instance name of [color=blue]mainHolder[/color]. Then I want to load an image that is defined as a variable in the [color=red]picData.txt[/color] file I load.

**Problem:** After loading the variables from the [color=red]picData.txt[/color] text file into a movie on the root timeline with an instance of [color=blue]mainHolder[/color] the variables could not be accessed. I tried [color=gray]trace();[/color] and everything.

**Note:** The [color=red]picData.txt[/color] is located in the same directory as the Flash file.[/size]

**[color=red]picData.txt[/color]**

```auto
picURL1=http://www.danalu.com/images/something.jpg&picURL2=http://www.danalu.com/images/somethingElse.jpg&picURL3=http://www.danalu.com/images/somethingElseAgain.jpg

```

**[color=blue]Frame 1:[/color]**

```auto
loadVariables("picData.txt", "_root.mainHolder");
mainHolder.picHolder1.loadMovie(picURL1);
mainHolder.picHolder2.loadMovie(picURL2);
mainHolder.picHolder3.loadMovie(picURL3);

```
