PDA

View Full Version : Button state - changing color


danni
09-24-2002, 03:50 PM
hi there

i try to explain with my english.

ok.
first: i did an animation it loops. the animation is a chain-like sequence of buttons (as the light bulbs they produce patterns). every "bulb" is a button that interacts with a dynamic text field. ok?

if the user clicks on a button it retrieves a string "S" from an array an writes it in the textfield. so far all right.

now. i would like to set the button in a different state when the user has clicked the button. it works for one sequence. when the loop starts again. the button returns to his previous state.

my question is: how can i retrieve the information wheter the dynamic text field is filled with the letter or not, so that i can tell the movie containing the buttons to rest in frame2, if the dtfield is containing letter "S"?
The user clicks the button, the botton turns into red an remains red and so one until the whole sentence can be seen.

hopefully you understand where the problem lies.

danni

farafiro
09-29-2002, 10:59 AM
I am not sure that I've got u right but see this code, if it's what u want and u want me still to look at your movie, tell me
//first the (!) sign means in flash (not)
//so we want to tell the button if the text box is NOT empty to do something
//else to do another, so we put that code in an empty MC
onClipEvent(enterFrame){
if(_root.mc1.myTextBoxName !=""){//this means if the text box isn't empty
//do something
}else{
//do anothier thing
}
}