Hi all,
Am new to this site and have been following many of the tutorials available and am quite an actionscript dummy. I’ve come across an issue in which I have no idea how to write out.
Right now, I have a gallery with many different thumbnails each individual movie clip symbols and not button symbols and each movie clip has a rollover and rollout function assigned to them which are all basically the same for each thumbnail.
Following is an example from a small section of the gallery thumbnails.
[INDENT]web04.btn04.onRollOver = function() {
this.gotoAndPlay(2);
};
web04.btn04.onRollOut = function() {
this.gotoAndPlay(6);
};
web04.sub04_1.onRollOver = function() {
this.gotoAndPlay(2);
};
web04.sub04_1.onRollOut = function() {
this.gotoAndPlay(6);
};
web04.sub04_2.onRollOver = function() {
this.gotoAndPlay(2);
};
web04.sub04_2.onRollOut = function() {
this.gotoAndPlay(6);
};
web05.btn05.onRollOver = function() {
this.gotoAndPlay(2);
};
web05.btn05.onRollOut = function() {
this.gotoAndPlay(6);
};
web05.sub05_1.onRollOver = function() {
this.gotoAndPlay(2);
};
web05.sub05_1.onRollOut = function() {
this.gotoAndPlay(6);
};
web05.sub05_2.onRollOver = function() {
this.gotoAndPlay(2);
};
web05.sub05_2.onRollOut = function() {
this.gotoAndPlay(6);
};
[/INDENT]The above shows two groups of thumbnails grouped into individual movie clips (web01, web02, web03) each movie clip containing 3 thumbnails (btn04, sub04_1, sub04_2). I had done it this way for grouping and ease of animation.
I was wondering if it was possible to create just one function which executes the rollover and rollout functions so the script window would not be filled with so much repeated script.
I hope I am explaining myself correctly.
And would really appreciate any help!