PDA

View Full Version : can i assign vars to an object on the fly?



j0se
September 23rd, 2003, 06:27 PM
more specifically: if i have an input box on the stage, can i assign it a variable via an event (let's say a button click)?

something like:

button1.onPress=function(){
myInputBox.var = variable1;
}
button2.onPress=function(){
myInputBox.var = variable2;
}

PS i know the .var doesn't exist btw (-: - it depits what i'm trying to achieve

j0se
September 23rd, 2003, 06:34 PM
button1.onPress=function(){
text1 = _root.inputBox.text;
}

patience...