Skip navigation
Currently Being Moderated

focus() swf from javascript for any browser

Jun 27, 2012 6:13 AM

Hi there

 

I have no solution for the following problem:

 

I open a html website including an swf.

this swf has a standard "<s:TextInput/>" and the cursor is blinking in that box.

It would be awesome when I could immediately start typing some text in that box without clicking first on the stage of the swf.

 

how could I manage that for any possible browser, e.g. IE, firefox, chrome, opera, safari?

 

Is there someone with a working solution?

 

I tried a lot of advices in javascript with the flash external interface like:

 

function externalInterfaceCallJava(value) {

                thisMovie("swfName").tabIndex = 0;

                thisMovie("swfName").focus();

}

            

function thisMovie(movieName) {

                 if (navigator.appName.indexOf("Microsoft") != -1) {

                     return window[movieName];

                 } else {

                     return document[movieName];

                 }

}

 

 

 

thanks for any advice

 
Replies
  • Currently Being Moderated
    Jun 27, 2012 7:58 AM   in reply to ne_polle

    The swfobject folks seem to think you can do this in most browsers.  Ask on their forum.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points