Hi all. First post in these foruns
I´ve been building a small page, all done in flash mx 2004. There is a lot of code in it, but basically it all comes down to stop(); play(); gotoAndStop and other very simple actionscript
The thing is I think the code could be simplified in some aspects.
My question is if there is way to simplify the next lines of code, and how.
if (thumb1._currentFrame == "20") { //thumb1 is the 1st thumbnail mc
_root.image1.play(); // movie1 is the 1st image mc
}
if (thumb2._currentFrame == "20") { //thumb2 is the 2nd thumbnail mc
_root.image2.play(); // movie2 is the 2nd image mc
}
if (thumb3._currentFrame == "20") { //thumb3 is the 3rd thumbnail mc
_root.image3.play(); // movie3 is the 3st image mc
}
//.....you get the picture...
if (thumb12._currentFrame == "20") { //thumb12 is the 12 thumbnail mc
_root.image12.play(); // movie12 is the 12nd image mc
}
All this code is doing is checking which thumb mc is selected (on frame 20 of each individual thumb mc) to tell the correspondent image mc to play. Only one thumb mc will be in frame 20 at a time.
I´m pretty sure there´s an easier way to do it, just havent figured it out yet…
Please pardon any errors… I´m Portuguese.
[[]]