michaellunsford
09-09-2008, 11:03 PM
Okay, so I've found about a billion different tutorials claiming they're the easiest way to do this. After hacking on this all stinking day, I've finally given up and hope someone here can help.
Some of these online tutorials are simple and work when they want to (and are not listenable), and some are crazy stupid complex. The only problem with the crazy stupid complex ones is they only load one image. If I can't figure out what the devil they're doing, how can I load four more? Yeah, not going to happen.
So why am I telling you all this? So somebody doesn't say "just google it" -- now you know I did and I'm more frustrated than ever.
Okay, so on to the problem:
I need to load five images from five URLs. Each image is in a single slide in a movie. The movie is all setup, the five slides are all setup, I just can't get the images to load inside the slides.
The URLs are coming in through a super-simple loadvars function with a listener. Once the URLs are loaded, a function fires to load the images.
I've tried the built in Loader component. It works great on a single layer flash "test" file, but when I pop it into my multi-layer flash file (where the images are tucked inside a movie instance), it just doesn't work. trace(this) tells me the name of the instance (see code below). I make the contentPath load to there and get squat.
lv = new LoadVars();
lv.load("http://example.com/get_data.php");
lv.onLoad = function() {
load_some_images();
}
load_some_images = function() {
_layer0.instance23.image1.contentPath = lv.PhotoURL1;
}
Truth be told, I'd prefer one that has a listener attached so I can launch the movie AFTER the images have loaded. Also, one that works would be better too ;-)
Due to some "features" (ala Microsoft) in the new CS3, I am hoping to write this in AS2 and compile in Flash 8. Any help would be super greatly appreciated.
Some of these online tutorials are simple and work when they want to (and are not listenable), and some are crazy stupid complex. The only problem with the crazy stupid complex ones is they only load one image. If I can't figure out what the devil they're doing, how can I load four more? Yeah, not going to happen.
So why am I telling you all this? So somebody doesn't say "just google it" -- now you know I did and I'm more frustrated than ever.
Okay, so on to the problem:
I need to load five images from five URLs. Each image is in a single slide in a movie. The movie is all setup, the five slides are all setup, I just can't get the images to load inside the slides.
The URLs are coming in through a super-simple loadvars function with a listener. Once the URLs are loaded, a function fires to load the images.
I've tried the built in Loader component. It works great on a single layer flash "test" file, but when I pop it into my multi-layer flash file (where the images are tucked inside a movie instance), it just doesn't work. trace(this) tells me the name of the instance (see code below). I make the contentPath load to there and get squat.
lv = new LoadVars();
lv.load("http://example.com/get_data.php");
lv.onLoad = function() {
load_some_images();
}
load_some_images = function() {
_layer0.instance23.image1.contentPath = lv.PhotoURL1;
}
Truth be told, I'd prefer one that has a listener attached so I can launch the movie AFTER the images have loaded. Also, one that works would be better too ;-)
Due to some "features" (ala Microsoft) in the new CS3, I am hoping to write this in AS2 and compile in Flash 8. Any help would be super greatly appreciated.