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

  • SEARCH
  • Home
  • 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 8095685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:12:54+00:00 2026-06-05T21:12:54+00:00

I am calling a Javascript function in my html page from a Flash movie

  • 0

I am calling a Javascript function in my html page from a Flash movie (using ExternalInterface) and I want to know if the user has the Shift key down when the function is called.

It seems straight forward if, for example, I call the function from a mouse click because I can pass the event and check ‘if (event.shiftKey)’. I don’t have an event to check!

Many thanks

Chris

  • 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-05T21:12:55+00:00Added an answer on June 5, 2026 at 9:12 pm

    Attach a keydown and keyup event to the document on the page and listen for the shift key.

    var shiftDown = false;
    var setShiftDown = function(event){
        if(event.keyCode === 16 || event.charCode === 16){
            window.shiftDown = true;
        }
    };
    
    var setShiftUp = function(event){
        if(event.keyCode === 16 || event.charCode === 16){
            window.shiftDown = false;
        }
    };
    
    window.addEventListener? document.addEventListener('keydown', setShiftDown) : document.attachEvent('keydown', setShiftDown);
    window.addEventListener? document.addEventListener('keyup', setShiftUp) : document.attachEvent('keyup', setShiftUp);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem calling a JavaScript function in an iframe from the parent page.
I'm calling the JavaScript function onsubmit of form but form has submit before finished
<?php $url='http://edition.cnn.com/?fbid=4OofUbASN5k'; $var = fread_url($url);// function calling to get the page from curl $search
I am using nodejs. And calling something like the following from a javascript file:
I'm calling out to javascript from a SL component using the HtmlPage.Window.Invoke api, when
Follow on from: Javascript wait for image to load before calling Ajax function initResources()
I have a little test swf to test calling an ActionScript(3.0) function from JavaScript.
I have a javascript function that I am calling from an image onClick event
I wanted to know if there is a way to stop Javascript from calling
This is related to a question I've asked previously: Calling Javascript function after loading

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.