I have a movie clip called “over”. I have created 4 instances named over1, over2, over3 and over4
I have 4 text fields called workscroll1 - 4
I want to set the colour of the over MC’s to white and the colour of the text fields to a colour I have created elsewhere in the site ( called menuTextStyleUp1)
Below is the code i have used and while it works ok, i have quite a few instances in the site where I am doing similar things
skinWorkAreaOver1 = new Color(_root.over1);
skinWorkAreaOver2 = new Color(_root.over2);
skinWorkAreaOver3 = new Color(_root.over3);
skinWorkAreaOver4 = new Color(_root.over4);
skinWorkAreaOver1.setRGB(_global.white); // set colour of mouse over box to no colour
skinWorkAreaOver2.setRGB(_global.white); // set colour of mouse over box to no colour
skinWorkAreaOver3.setRGB(_global.white); // set colour of mouse over box to no colour
skinWorkAreaOver4.setRGB(_global.white); // set colour of mouse over box to no colour
_root.workscroll1.setTextFormat (_root.menuTextStyleUp1); // change the colour of the text to the default colour
_root.workscroll2.setTextFormat (_root.menuTextStyleUp1); // change the colour of the text to the default colour
_root.workscroll3.setTextFormat (_root.menuTextStyleUp1); // change the colour of the text to the default colour
_root.workscroll4.setTextFormat (_root.menuTextStyleUp1); // change the colour of the text to the default colour
Could someone help me to put this into a loop.
I have looked at some of the tutorials on this site and tried the following but get errors
i = 4;
while (i > 0) {
eval(“skinWorkAreaOver” +i) = new Color(_root[“over” +i]);
eval(“skinWorkAreaOver” +i).setRGB(_global.white);
_root.workscroll1.setTextFormat _root[“menuTextStyleUp” +i]);
i–;
}
:cyclops: