View Full Version : Variables for input text fields... Global?
zamfir
04-18-2005, 02:35 PM
I am making a training tool that has many text fields in many frames that the user must be able to navigate backward and forward through. I have tried to set the input text fields as global so the values will carry from frame to frame. Oddly, if I set the variable in the property box to a non-global variable name, the value will carry from frame to frame, but if I declare the variable as global in the first frame and refer to it as global, it will never allow me to change its value, the value has to be set by actionscript. I'm wondering if there is an elegant way to handle things like this, without having to stuff variables and set them via actionscript, or without having to use the "listener"... Any ideas?
well i remember i once had this problem. I just had an invisible movie clip for the whole movie called something like "store" and just point the variables to that so that you can refer to them later
zamfir
04-18-2005, 04:15 PM
I don't know, that seems sort of uneccessary, and it doesn't seem like the real "solution" that Actionscript would suggest, but I don't honestly know any better. I've got three AS 2.0 books, (including the O'Rielly book) and I haven't seen anything that makes the input text component and variables make sense. The best I can figure is that declaring the variables in the first frame like so:
FirstVariableName;
SecondVariableName="sometext";
where the first example is a blank text iput box and the second will be prepopulated. This makes the variables available throughout the timeline, and I guess if I need to access those variables outside the timeline for any reason I can just stuff the values into a global. To be honest, though, the whole combobox, radiobutton, input text UI "handler" crap is only useful when you're making a big detailed form with many different UI components on it, where some UI components affect others, otherwise they don't seem very useful and actually seem very unwieldy.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.