Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8011947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:10:30+00:00 2026-06-04T19:10:30+00:00

For AS2 I need to allow the user to press Alt + N to

  • 0

For AS2 I need to allow the user to press “Alt + N” to go to the next page, but the problem is that in Windows whenever Alt is pushed it takes focus off the flash embed and the keylistener never receive it.

Researching what to do, it seems that the solution is to use Javascript to disable the default action of the ALT key in Firefox (the browser it needs to run in). I’m not sure if this is the right path, and not exactly sure how to do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:10:33+00:00Added an answer on June 4, 2026 at 7:10 pm

    Well, you’ll need an external interface in the flash program; something like this:

    function keyCodeReceptor( code ){
      switch ( code ) {
        case 67:
          // go to the next page
          break;
        // add any other keys you need to bind to "Alt+key" combination
        default:
          break;
      }
    }
    
    flash.external.ExternalInterface.addCallback( 'doKey', null, keyCodeReceptor );
    

    Then you’ll need something like the following in the HTML you’re embedding the object in:

    (function(){
      // Use the name or index of your embed here
      var flash = document.embeds[0];
      window.addEventListener( 'keydown', function( event ){
        if( event.altKey && event.keyCode == 67 ){
          event.preventDefault();
          event.preventCapture();
          event.preventBubble();
          flash.doKey(event.keyCode);
        }
      });
    })();
    

    Also, make sure that the embed has the allowScriptAccess attribute set to "always".

    I only tested this is Firefox (latest, Mac and Windows), so I don’t know at all if it works in other browsers. Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've inherited an AS2 app that has a lot of functionality. I need to
For my recent project I need to work with as1. The problem is that
I have this code in as2, it works great, but I need to adapt
I need to load as3 swf file into an as2 swf file, but as
In AS2, I need to get a URL. In the header of the HTTP
I have an AS2 swf that has an array that is updated when a
I have some AS2 code that opens a SWF file through an HttpHandler. I'm
I have a Flash program that loads AS2 and AS3 SWF files dynamically with
I have a Windows Service that performs a number of periodic activities, and I
My query returns the row value as 2/27/2010 12:00:00 AM but I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.