-
loadMovie troubles
Hello, all :)
Let's say I have a folder with 25 images, all the same size and resolution, named 1.jpg, 2.jpg, 3.jpg and so on.
Here is a code I came up with to load the images into a Flash file, also in this folder. The code is on frame 1, when it loads the image. After some time with blank slides, it reloads another image. All of this works fine.
Code:
if (!vari) {
vari = 1;
_root.createEmptyMovieClip("lolwut",1);
_root.lolwut.loadMovie(vari+".jpg");
_root.lolwut._alpha = 0;
_root.lolwut._x = 0.6;
_root.lolwut._y = 0-50;
} else {
_root.lolwut.unloadMovie(vari+".jpg");
if (vari<25) {
vari += 1;
} else {
vari = 1;
}
_root.lolwut.loadMovie(vari+".jpg");
}
Of course, the stage size is the same size of these images.
Now the problem presents itself when I add an image of a different size. For some odd reason, when I add a _root.lolwut._width = anything, the image fails to load properly. All I ever see is the back of the stage. This is why I need to make the stage fit the image, as opposed to vice versa. I can't resize an image loaded.
What I'd need some help with is why ._width and ._height don't like this.
Thanks!
-