Dynamic Array Problems

(see this thread first.)

I’ve tried using a LoadVariable command to load the names of picture files from a .txt file.

They are supposed to be loaded into an Array.

When I test the movie, it will trace the array to the output panel, and show me the filenames correctly. BUT, when I go to load the picture (using LoadMovie), in the output panel it says:

***Error opening URL "***[file:///C|/Inetpub/flash/images/***](file:///C|/Inetpub/flash/images/)***"

It shows up like it’s not seeing a filename to load.

Why is this? What can I do to fix it?
:puzzle: :h: :puzzle:

Thanks!

I still need help with this issue.

Has anyone else had this problem?

Any help would be appreciated!

Thanks!

Do you do something like:



myPlaceHolder.loadMovie(MyArray[0]);

for instance?

Yes!

Actually, I just got it to work using the following:

Frame 1:


lv = new LoadVars();
lv.load("arrayText.txt");
lv.onLoad = function(ok){
if(ok){
trace(this.MyArray.split(","));
arrayText = this.MyArray.split(",");
} 
else {
trace("An error occured while loading the data!");
}
}

Frame 5:


stop();
this.pathToPics = "C:/Alex/flash/experiments/images/";
_root.photo.loadMovie(this.pathToPics+MyArray[0]);

I think it had to do with using

_root.photo.loadMovie(...);

instead of

loadMovie(this.pathToPics+this.MyArray[0], _root.photo);

Although, I don’t see how it’s any different. :puzzle:

Oh well. At least it works. :thumb:

Thanks for the help!

Any time :}