[COLOR=deeppink]Hello hello,
I’m having trouble with some scripting.
I have 2 butons…im using variables…and… on rollover…the buttons fades to magenta… on rollout… the buttons fades beack to white. What I want to do is…if you click one button…that one stays magenta…while the other one stays white… if you click the other button… the firtst button turns back to it’s original state.
I’ve tried using only the movies but I can’t get it to work…So I tried using setRGB…but… isn’t it possible that… in the IF - part…I can say something as: go to original color … or… disable the part setRGB???
Below you can see the script of one button. I’m not so good at explaning so I hope i’m not rambling here.
on (rollOver) {
but2.gotoAndPlay(“magenta”);
}
on (rollOut) {
but2.gotoAndPlay(“white”);
}
on (release, releaseOutside) {
stopxback = -1481.2;
stopxfront = 494.9;
_root.back.gotoItem(this);
_root.front.gotoItem(this);
myColorObject = new Color(_root.front.but2);
myColorObject.setRGB(0xFF0099);
_root.var2 = 1;
if (_root.var1 == 1) {
myColorObject = new Color(_root.front.but1);
myColorObject.setRGB(0xFFFFFF);
_root.var1 = 0;
}
I hope someone can help me? :te:
greetz…
}[/COLOR]