# Dynamic Image Loading Help \*sigh\*

**URL:** https://forum.kirupa.com/t/dynamic-image-loading-help-sigh/34110
**Category:** flash
**Created:** [October 28, 2003, 9:51am UTC](https://forum.kirupa.com/t/dynamic-image-loading-help-sigh/34110 "2003-10-28T09:51:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RaraAvis](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@RaraAvis](https://forum.kirupa.com/u/RaraAvis)
#### Post date: [October 28, 2003, 9:51am UTC](https://forum.kirupa.com/t/dynamic-image-loading-help-sigh/34110/1 "2003-10-28T09:51:08Z")

</div>

Hi,  
Using PHP I print out a text file which has this is in it:

```auto

&picture1="tab.jpg"&picture2="tab2.jpg"

```

from there I want to load those picture variables into flash, here’s my code:

```auto

onClipEvent(load)
{
loadVariables("variables.txt", this);
tempvar = picture1;
loadMovie(tempvar, _root.picture1);
}

```

but when I load the movie up it comes up with “folder/undefined” is not a valid file. So this means obviously that the variable picture1 ain’t being loaded correctly. Anyone know why?

I also did a quick test with a dynamic text box and set the var to picture1, worked fine.  
Also, just putting in “tab.jpg” instead of ‘tempvar’ in the loadMovie() works fine.

Thanks guys

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 10:08am UTC](https://forum.kirupa.com/t/dynamic-image-loading-help-sigh/34110/2 "2003-10-28T10:08:29Z")

</div>

PHP File Output:

&picture1=tab.jpg&picture2=tab2.jpg //Note, no quotes.

Flash AS:

```auto

lv = new LoadVars();
lv.onLoad = function(success){
if(success){
_root.pic1holder.loadMovie(this.picture1)
} else {
trace("Path not correct.");
}
}

```

🙂
