ESC key capture failed IE6 & flash player 8


Currently been working on a flash project where the ESC sequence was of much use. The ESC key got captured perfectly in FireFox 2.0, IE 7 but failed in IE6.

Here are the screenshots of IE6 version on which I have tested

ie_6.gif

Here is the flashplayer version checked on Adobe

flashplayer_8.gif

Here is the Flash Actionscript code:

   1:  this.createTextField("mytext_txt", this.getNextHighestDepth(), 0, 0, 100, 20);
   2:  var keyListener:Object = new Object();
   3:  keyListener.onKeyDown = function() {
   4:       if (Key.isDown(Key.ESCAPE) ) {
   5:           trace("ESC key pressed");
   6:           mytext_txt.text ="ESC key pressed";
   7:       }
   8:  }
   9:  Key.addListener(keyListener);   
  10:  // be sure to disable key shortcuts in flash IDE during testing

Can any one tell me where I have gone wrong. Is it something to do with IE6 or any hack, needs to be done on the Actionscript. AS Guru’s looking for your help.

Technorati Tags: , , , , , , , , , , , , ,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s