• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

KEY_UP won´t work for key ENTER without clicking on stage

New Here ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

Hi.

I´m trying to catch KEY_UP event if I press ENTER, without clicking on stage.

I´ve already disabled keyboard shorcuts for flash player, and added stage.focus = stage.

Not succeeding.

It only works if I click on stage.

It seems that for the other keys the KEY_UP works.

Any help?

TOPICS
ActionScript

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

are you testing in your browser or, if in the test environment, did you disable keyboard shortcuts?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

Yes I have disabled.


KEY_DOWN works for key ENTER, without click on stage, but KEY_UP doesn´t.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

you're correct.

you won't even be able to capture your keydown's if you're creating a browser based app unless you use javascript to assign focus to your flash.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

What if I wanted to add focus (as clicking on stage) for a projector (aka EXE file)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

test and let us know.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

Works for projector files, no need to click on stage.

How do I set flash focus for Chrome?

I know that for IE is document.getElementById("movieID").focus();

What is needed to set flash focus on Chrome?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

use javascript to assign focus in a browser.  this is from an adobe kb article:

To the <BODY> tag, add an onLoad handler that gives focus to the Flash movie, as shown below:  <body  onLoad="window.document.movieID.focus();"> Make sure that movieID in the onLoad handler matches the name given to the OBJECT tag used to embed the Flash movie, as shown below.  <object classid="..." codebase="...."     width=550      height=400     name="movieID"> You can give any name to the OBJECT tag as long as it doesn't contain any spaces or other special characters.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2012 Mar 21, 2012

Copy link to clipboard

Copied

Yes, but that is used for Internet Explorer.

That doesn´t work on Chrome, and I think for Firefox too.

What is used for Chrome?

I´ve tried to use ExternalInterface and LoaderInfo in addition to some js.

It only gives flash focus I think, doesn´t seems to give keyboard focus.

I have an input text field on my swf.

The cursor blinks inside the text input, but I can´t write (type) anything inside the input text.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

LATEST

I have the same problem and it would be awesome when someone could give a solution for any browser.

Is there someone with a working solution?????????

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines