A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Selection.setfocus .......problem!

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    118
    Hi FK..

    I have a text input box which i have set so that the curser is flashing inside it when the movie is loaded from the server, however im unable to type into the input box unless i click my mouse inside the box...very strange...the cursor is flashing inside but i cant type!

    my script is this...

    Selection.setFocus("mytext1");
    mytext1.tabIndex = 1;
    mytext2.tabIndex = 2;
    mytext2.password = true;

    any ideas how to solve this would be great...thanx!

  2. #2
    Senior Member
    Join Date
    May 2000
    Posts
    356
    Well, the focus has to first be set on the Flash movie, so you might want to create an enter button or something that forces the user to click on your flash movie first.

  3. #3
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Make sure that the swf in the htmlpage is in focus too. otherwise it won't get any input. I belive this must be done from HTML/javascript.

    Now it's been quite sometime since I worked with javascript so I don't remember exactly how to do it...

    /Mirandir

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    118
    hi thanx for the replys...

    I actually have a chat room that i designed that sets the focus on the input text box and allows you to imediatly type without clicking the movie, so its possible to do this without clicking and or javascript.. the strange thing is i used the same AS in that movie as i did this.

    thanx anyways!

    :-)

    PS... thinking about it now though the chatroom movie is loaded in on a higher level so i suppose focus is therefore attained in the _root.movi....correct? :-((
    [Edited by cozy on 09-25-2002 at 09:09 AM]

  5. #5
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Yes but was the user forced to navigate through the swf or another swf before the chatroom came up? In that case focus was set to the swf before any typing was possible!

    /Mirandir

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center