1 Attachment(s)
[RESOLVED] Sticky setFocus & non-functioning tabs
Hi fruitbeard and all else,
I am back with some more problems in AS2.0
Find attached a small snipped of code. It creates two run time input boxes.
The first box is named TypeA & the 2nd TypeB
Once it does that it gives an initial text value of "Go" to TypeA and then calls a timer to display the 2 boxes which remain on screen for a duration of 9 seconds and are then refreshed so to speak i.e. the value of TypeA is set back to go and the boxes are displayed again.
The problems that I face.
1. I wanted the program to end if i typed "end" in TypeA box. It does not end. Some silly mistake that I cannot find in the logic.
2. Because of the way the timers are set, the time taken by the boxes to appear is 9 seconds. What should happen is that the boxes should appear immediately and then they should refresh every 9 seconds. The first 9 seconds of wait makes the program appear to hang.
3. The very first time the program is run, Go appears and focus is set to it as can be seen. However if I try and use the tab-key to alternate between the 2 boxes, it does not do so :(. This tabbing has no effect. It however starts to tab through the flash IDE. Further it does not permit the usage of the back slash key to clear GO. If I directly type something when "GO" appears on the first run, the typed text does not automatically replace "GO" as it should ( just like the backspace key fails so do all the keyboard keys). If however I use the mouse once and click inside the box, the caret appears inside the box and the focus goes as also all of the problems that I mentioned in this paragraph above .
So how can I achieve this programmatically so that it behaves like I want it to even the first time with the focus on "GO". I mean that Go should be over written by the keys I type & the backspace should delete "GO" & the tab should work normally alternating between the two boxes.
Please help. Thanks loads