ActionScript Question
- Started
- Last post
- 7 Responses
- k5m
ok, I'm not that good at actionscripting and I need some help. I have a symbol that when you click it, it changes color. Now the code I have will only all the color to change once. However the client wants it so when you click it, it changes to color A, and when clicked again chancgtes to color B. The code I have is pretty simple. Take a look:
on (release){
var colorful = new Color("_root.az");
colorful.setRGB(0x003366);
}The fuction I need is something like this. if color == A set color B, if color B set color A
Thanks!
- spmitch0
the word portfolio is misspelled on your navigation
- fate0
spmitch, don't reply with that crap.
on a frame:::::::::::
varAB=truebutton code::::::::
on (release){
if(varAB==true){
varAB=false
var colorful = new Color("_root.az");
colorful.setRGB(0x0 03366);
}else if (varAB==false){
varAB=true
var colorful = new Color("_root.az");
colorful.setRGB(SUMFINELSE);
}
- ********0
portfilio is teh gangsta slang...
didn't you know that?
- fate0
I hope I typed that right, but varAB would act as a "toggle" between the 2 states of color.
If it's true, show one color and set it to false.
If it's false, show the other color and set it to true.
- k5m0
Thanks Fate. I'll give that a shot right now.
- Kris
- jevad0
Portfolio is still spelt wrong though
- k5m0
Naw I think I like the gansta style protilio. Sounds like something snoop would say. Beasides that guy above is the first person to check out my site in like 5 years. I should give him a gold star for going there.