how to test change in textbox
I'm trying to solve this little problem
I have a value in a text box and I want to process the number using the previous value with the new value, but I want to do it without the user having to push a button.
I tried setting the old value to a variable on onSetFocus then in the onChanged used it, this works so long as the user leaves the textfield before changing the value again. In other words if the user already changed the Value and then backspaces and changes it again I cannot get the value before change.
Code:
myshutter.onSetFocus=function(){
oshutter=Number(myshutter.text)
txt2.text=oshutter
}
myshutter.onChanged=function(){
oshutter=Number(myShuter.text)
txt1.text=shutter(myshutter.text,oshutter)
temp=shutter(200,180)
// var temp=shuttter(Number(myshutter.text),oshutter)
if (choice._currentframe==2){
//get new tstop
stop.text=Number(stop.text)*temp
}else{
//get new fps
}
}