I’m working on creating a feature where you can change the colour-scheme of a website by clicking on certain buttons. However, it’s very limited if I work using the basic code provided in the AS colour change tutorial (which I did a little while back).
Anyway, I’ve created a function for this which I am about to test out but even with the function (the way I created it) I would still have to set the onPress of the buttons (I’m doing all the AS in a frame on the main timeline as a pose to on the buttons) to change every individual movie clip that I want to change the colour of…
So, I don’t know how I could make this easier but I was thinking that creating an array containing those movieclips that I want to change the colour of and then using AS to get Flash to change the colour of every movieclip in the array might work.
I’m not sure how I would do this or if it would work. Could somebody help me out please?
add that code on the first frame, so now, when you click the button, lets say the button that says RED, the mc’s 1 to 8 will go to the frame called RED…
to add more mc’s, just give them an instance name, make them have multible colors and label the frames, then add the mc’s instance name to that list…
RvGate, that is a possible solution but creating frames within the movieclips and entering in all that code would actually take longer than my method lol.
Sen, I’m taking a look at the .fla now and I will get back to you :).
By “all that code” I mean the instance names of every movie clip. Using my original method (which I thought was inefficient), I can do the same thing but I don’t need to create new frames within each movie clip for the different colours.
If you wish, I will post my function (which I am going to convert into a prototype [hopefully :)] in a moment).
Sen, the code used there is a little over the top for what I’m intending to achieve. I will do it using my inefficient way (which actually seems very similar to the way that circles effect is done - although, I didn’t spend hours looking at the script) and see how it goes. I’m convinced that there is an easier way to do this (perhaps adding all the movie clips to an array…) but I don’t know what it is.
RvGaTe, thanks but no thanks :). Your code follows the same idea as my original code - meaning that there is no real need to implement my .fla using your code.
But ty very much for the offer :thumb:. I will post up the finished colour-change bit in a day or two (because I’m having trouble with another part of the website and need to fix it).