Hi thanks for you help.
This is the code Im playing with:
stop();
myCounter = 0
yourCounter = 0
left_mc.onRelease = function() {
myCounter = (myCounter + 1);
if (myCounter == 1) {
var hairColor:Color = new Color(left_mc);
hairColor.setRGB(0xffffff);
};
if (myCounter == 2) {
var hairColor:Color = new Color(left_mc);
hairColor.setRGB(0xff0000);
};
if (myCounter == 3) {
var hairColor:Color = new Color(left_mc);
hairColor.setRGB(0x000000); myCounter = 0;
};
}
right_mc.onRelease = function() {
yourCounter = (yourCounter + 1);
if (yourCounter == 1) {
var hairColor:Color = new Color(right_mc);
hairColor.setRGB(0xffffff);
};
if (yourCounter == 2) {
var hairColor:Color = new Color(right_mc);
hairColor.setRGB(0xff0000);
redRight =
};
if (yourCounter == 3) {
var hairColor:Color = new Color(right_mc);
hairColor.setRGB(0x000000);
yourCounter = 0;
};
}
// this is where I want to put in a condition, that is if one of the
MovieClips named left/right_mc is a certian colour then do something.
But I cannot get the var to be recognised outside of the function. You
mention make it global, this I am not sure how to do. Do you mean by not
putting var at the begining when I declar the var? thanks again for any
insights.
if (right_mc == 0) {nextFrame();
};
[quoted text, click to view] > Hi,
>
> If you just want the value to be checked out side the function and the value
> is
> modified in side the function make it global, if you want the function
> variable
> to retain the value over the deifferent calls to the function make the
> variable
> static.
>
> If you can provide the peice of code you are trying to it will help us
> helping
> you better.
>
> Good luck
>
> Hemendra Singh Shaktwat
>
> Mindfire Solutions