Dynamic Image Loading Help *sigh*

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


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

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


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

PHP File Output:

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

Flash AS:


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

:slight_smile: