This content has been marked as final. Show 5 replies
what code are you using?
The core is:
posframe = Number(_root.inputTextBox1a.framepos.text)
I've tried a bunch of different things - defining the input field as a button and putting it in an onClipEvent handler, defining the series of frames as a movieClip and putting it in an onEnterFrame handler, putting it as a script all by itself in a layer, assigned to the frame... nothing works the way I want it to.
I'm willing to entertain suggestions for a better way to do it. We want to be able to have a visitor move physical controls and have that control the playback of the file. The developers don't want to use the mouse (which would be near-trivial) because it only has two dimensions, and we could easily have a need for three, four, or more input dimensions.
if you use trace(posframe) do you see what you expect? if not check the textfield's path/instance name and make sure it's not html-enabled (ie, no auto-kerning checked in the properties panel). if so, you should be using the goto method, not the goto function:
trace(posframe) gives expected results most of the time, depending on where I have the script.
I wasn't aware there was an operational difference between a function and a method. I'll look at that. Can you point me to some documentation that explains it? All I've got is the docs that ship with MX.
Now to the next part: how to keep the focus in the text field? Other team members are working on an app to take joystick input and turn it into integers, which they will send to the screen as keystrokes. I need to have the Flash move start with the focus in that text field, so the keystrokes land in the field.
the goto function is known to have bugs. i'm not sure macromedia has acknowledged this.
the bug is sporadic but i believe can be reproduced by using scenes and moving a latter scene to the first scene position.
use Selection.setFocus(yourTextField) to set the focus on yourTextField.