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

keyboard event dont dispatch when switch to arabic on mac

Community Beginner ,
Jun 29, 2012 Jun 29, 2012

Copy link to clipboard

Copied

keyboard event dont dispatch when switch to arabic on mac

i have faced aaproblem

iam writing simple code in flash cs5 -as3

i creat my project from windows  invironment

after publishing the code and testing  it on mac , the keyborad event didnt fired , and that happens only when switch the keyboard to arabic language.

but when the selected language is english every thing work fine

this my code

import flash.ui.Keyboard;

import flash.events.KeyboardEvent;

import fl.text.TLFTextField;

import flash.text.TextFieldType;

var trace_txt:TLFTextField= new TLFTextField()

trace_txt.width=500

trace_txt.height=400

addChild(trace_txt)

trace_txt.selectable=true;

var txt:TLFTextField= new TLFTextField()//this is only for writing text in , to test when switching to arabic lang

txt.height=30

txt.width=500

txt.y=410

trace_txt.y=5

txt.x=5

trace_txt.x=5

txt.selectable=true

txt.type=TextFieldType.INPUT

addChild(txt)

txt.border=true

trace_txt.border=true

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler)

function keyDownHandler(e:KeyboardEvent):void

{

          try

          {

                    

          trace(e.keyCode)

          trace(String(e.keyCode))

           var character:String = String.fromCharCode(e.charCode);

          trace_txt.appendText("keycode:"+e.keyCode+",   charCode:"+character+",   keyLocation :"+e.keyLocation +"\n")

          if(e.keyCode==Keyboard.A)

          {

                    trace_txt.appendText("a is pressed\n")

          }

          }

          catch(e)

          {

                    trace_txt.appendText("errroor\n")

          }

 

}

//stage.focus=stage;

TOPICS
ActionScript

Views

639

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 Beginner ,
Jun 30, 2012 Jun 30, 2012

Copy link to clipboard

Copied

LATEST

any help ???

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