A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: ExternalInterface.call and set focus after HTML click

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    682

    ExternalInterface.call and set focus after HTML click

    I have a audio player that takes its audio file name from a link in the HTML. I'm using ExternalInterface.call in Flash with a JavaScript link in the HTML.

    My player has a function that normally runs when the space bar is pressed. However, when I select an HTML link, I lose focus on the Flash player, so - when the space bar is pressed nothing happens. If I click the player to give it focus, then the space bar works on the player.

    How can I return focus to the player after the HTML click? Here is what the html link looks like.

    <p>1. <a class=Uline href="javascript: void();" onclick="makeCall('normalSong')" title="Normal Song" border=0>Audio 1.</a></p>

    Thanks.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I am not sure you can do something, since what you describe is similar to opening another browser window. If you don't click on the original window, you don't have focus.

    This seems to occur only with javascript, since regular links are not affected.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    682
    Thanks for the response. I was afraid of that. Someone has suggested to me (without explanation) that the following may help, but I have no experience with it.

    var WshShell = new ActiveXObject('WScript.Shell');
    WshShell.AppActivate("APPLICATION_NAME");

    I have no idea how to implement that in any helpful way, but someone told me it might help.

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