PDA

View Full Version : LoadMovie with an image using a string? Possible?



jjmancini
June 24th, 2004, 05:42 AM
Alrighty...

What I am trying to do is simply load the images location using a string.

Here is my Code.


//Load Images
image1 = "image.jpeg"
image2 = "image.jpeg"
image3 = "image.jpeg"
image4 = "image.jpeg"
image5 = "image.jpeg"
image6 = "image.jpeg"
image7 = "image.jpeg"
loadMovie(image1, _root.image1);
loadMovie(image2, _root.image2);
loadMovie(image3, _root.image3);
loadMovie(image4, _root.image4);
loadMovie(image5, _root.image5);
loadMovie(image6, _root.image6);
loadMovie(image7, _root.image7);

Yet this does not work.....

The reason I need it to be a string is because later it will be loaded via XML.
So does anyone have anyides how this might work?

Thanks! :hugegrin:

Zakalwe
June 24th, 2004, 08:05 AM
Well, it should work perfectly well...

The problem might be that you have there the variable name image1 (for the name of the image) and a movie clip with the same instance name... Try changing the name of the movie clip to something else, like container1, container2 etc. Might help.

But if it doesn't...then you could be more specific? How doesn't it work? Does the image simply not appear, or do you maybe get an error message in the output window?

(by the way, check that your jpg's are not saved as progressive)

:)

jjmancini
June 24th, 2004, 03:30 PM
Reply, your right, the image name was messing up with the image location. Thanks! It seems I frequently miss lil' things like that.

Thanks!