dingleberry
Programmer
Hi,
I've got a movie that loads images stored on the server in a seperate directory. I do this because preloading all of the images (some 500) would take an awful amount of time. I'm trying to optimize the process so instead of doing
on (release) {
pic = "image2.jpg";
loadMovie("images/"+pic, "_root.blankmovie"
;
}
for one button and
on (release) {
pic = "image3.jpg";
loadMovie("images/"+pic, "_root.blankmovie"
;
}
for another and so on and so on like 500 times, I'd like to make a global statement on main movie like
_global.pic = Button._name
and then for entire movie do something like
on {???everybutton???}(release) {
loadMovie("images/"+pic, "_root.blankmovie"
;
}
but I really have no idea how to tell the movie that the button I'm referring to is the one I just clicked. Any ideas? I'm open to a complete change of thinking here too. I'm kinda new to flash and may be in over my head. If you know of a better way to do this, let me know or if you just know the correct syntax of what I'm trying to do, I'd love some pointers.
tia,
dan
I've got a movie that loads images stored on the server in a seperate directory. I do this because preloading all of the images (some 500) would take an awful amount of time. I'm trying to optimize the process so instead of doing
on (release) {
pic = "image2.jpg";
loadMovie("images/"+pic, "_root.blankmovie"
}
for one button and
on (release) {
pic = "image3.jpg";
loadMovie("images/"+pic, "_root.blankmovie"
}
for another and so on and so on like 500 times, I'd like to make a global statement on main movie like
_global.pic = Button._name
and then for entire movie do something like
on {???everybutton???}(release) {
loadMovie("images/"+pic, "_root.blankmovie"
}
but I really have no idea how to tell the movie that the button I'm referring to is the one I just clicked. Any ideas? I'm open to a complete change of thinking here too. I'm kinda new to flash and may be in over my head. If you know of a better way to do this, let me know or if you just know the correct syntax of what I'm trying to do, I'd love some pointers.
tia,
dan