Hadn't realised it was converting some of the code to italic, the loop statement should be
for (i=0, j=0; i<9, j<9; i++, j++) {
newcolor(clip [ i ], colour[j]);
}
Soory the loop statement should be
for (i=0, j=0; i<9, j<9; i++, j++) {
newcolor(clip[i], colour[j]);
}
and not
for (i=0, j=0; i<9, j<9; i++, j++) {
newcolor(clip, colour[j]);
}
I have this code on frame 1
clip = [middle, bottom, menu, menuarrow, menutext,];
colour = [];
function newcolor(clip, colour) {
MCColor = new Color(clip);
MCColor.setRGB(colour);
}
And this on a button
on (release) {
colour =['0xCCA68C', '0x663300', '0x996633', '0x996633','0xCCA68C'];
for...
I have two arrays in my frame 1 root timeline
clips[menu,middle,background,bottom]
colours['0x336666', '0xCC9933', '0x1234cc', '0x1111BB']
When a user clicks on certain buttons it adds colors to the colours array, at specific places
on(release){
colours[1]=0x123456
}
on(release){...
Sorry I should have specified that for the use of this I will need to use 2 arrays, one for colours and one for clips
with this code
function newColour(clip, colour) {
MCColor = new Color(clip);
MCColor.setRGB(colour);
}
//
clip = [menu, content, bottom, middle];
colour = ['0x9999AA'...
Actually that doesn't work (nothing happened), I think its because you have to add[i] in the sunction paramters when you call it, like this:
function newColour(clip, colours) {
MCColor = new Color(clip);
MCColor.setRGB(colour);
}
//
clips = [menu, content, bottom, middle];
colours =...
Thanks a lot for that, now for the seccond part ;)
I have an array of clips and colours which I want to pass through the function. This is my code so far:
function newColour(clip, colour) {
MCColor = new Color(clip);
MCColor.setRGB(colour);
}
clips = [menu, content, bottom, middle]...
Could you please tell em how to create a function for this
MCColor=new Color("menu.bgmenu") ;
MCColor.setRGB(0x9999AA);
I would like the paramters to be the mc the color will be applied to, and the color itself
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.