Loading images from text file variables

I'm trying to dynamically load jpgs using flashmx

This works:

y="image19.jpg";
loadMovienum(y, 0);

Image19.jpg shows.

However when I try to retrieve image19.jpg as a variable from a MIME encoded text file the following code doesn't work.

data.txt is comprised of one line of code and is saved in the save directory as the jpg images.
x=image9.jpg&y=image19.jpg

loadVariables("data.txt", "0");
loadMovieNum(_root.y, 0);

What am I doing wrong? Thanks in advance.


RichardSteeleAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ZefferConnect With a Mentor Commented:
sorry make it..loadVariablesNum("data.txt", 1); as you're
loading into a level not a target.

Z
0
 
ZefferCommented:
try..
loadVariables("data.txt", 1);
loadMovieNum("y", 1);

Z
0
 
rascalpantsConnect With a Mentor Commented:
just so you know, in the code you provided, you are using loadVariables() but you are trying to load it into a target or movieclip named "0" ... I think you want to use:

loadVariablesNum("data.txt", 0);


also, you should make sure that all of the data has been loaded into the movie before you try to call the variable in  loadMovieNum(_root.y, 0);  


rp


0
 
rascalpantsCommented:
RichardSteele,


you need to close this question out...

please come back and comment or award the points...


rp
0
All Courses

From novice to tech pro — start learning today.