Hi when using Selection.setFocus in my main timeline it won´t work. The curser goes to the selected textfield but it won´t accept any typing until I click it with the mouse.
In another forum I read tha I have to set the focus to Flash to get the setFocus action to work.
That one flew right over my head does anybody have any similar experience and how did you solve it?
well, the textfield has focus inside the flash movie, but the flash movie doesnt have focus inside the HTML document… to solve this you need to set focus to the movie when the page loads. so, add something like this to a script tag in the head:
function focusFlash() {
myFlashMovie.focus();
}
and add an onLoad event to your body, like this:
onLoad="focusFlash()"
oh, replace ‘myFlashMovie’ with your movie’s name.
ok, lemme explain it a little further… what appears as the “name” of the flash movie object, should appear in the script before the “.focus()” method. shuga, if your script refers to ‘peoplesearch’ your movie’s name should also be ‘peoplesearch’.
and i think that script doesnt work for you mooler because “java script” is not a valid language! its “JavaScript”, no space…
i’m off work today so i won’t be able to see if it works till monday. the name of my movie is peoplesearch.swf and aside from that i don’t see anything wrong with my code. but i guess i’ll check on monday … thanks for the help
additionally i tried setting the tabIndex in flash but that didn’t help to do anything but make it so my other buttons didn’t respond to tabbing
i guess when you set a tab index you have to then specify all buttons in the movie in their order of importance
Hi again brainy hope you can help me with this one as well.
The focus works great but after filling in that textfield and using Tab the curser jumps to the url textfield of the browser insted of the next textfield in flash.
This code is in the same frame as the textfields (it´s a form)