  | |  | AW: [Flashcoders] Key.isDown with String | AW: [Flashcoders] Key.isDown with String 2004-03-09 - By Heiko Schweickhardt
Back nice solution, thanks!
- h.
> -- --Urspr?ngliche Nachricht-- -- > Von: Mike Mountain [mailto:mike.mountain@(protected)] > Gesendet: Dienstag, 9. M?rz 2004 12:50 > An: flashcoders@(protected) > Betreff: RE: [Flashcoders] Key.isDown with String > > > keyControl = new Object(); > keyControl.onKeyDown = function() { > trace(Key.getCode()); > if (Key.getCode() == Key.ENTER) { > trace("pressed"); > ); > } > }; > Key.addListener(this.keyControl); > > HTH > > M > > -- --Original Message-- -- > From: Heiko Schweickhardt [mailto:flash@(protected)] > Sent: 09 March 2004 11:18 > To: flashcoders@(protected) > Subject: [Flashcoders] Key.isDown with String > > hello, > > i was about to write function which receives variables for > the key-code (i.e. "Key.ENTER") and an action (function to be > executed). the function would generate a specific listener > for that key. > > my problem is that Key.isDown seems only to accept the > written "Key.ENTER" and not a variable(string) instead. > > my_string="Key.ENTER"; > if (Key.isDown(my_string)) {} > > does not work. > > any ideas? > > - heiko > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > Supported by Fig Leaf Software > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > Be sure to check the archives and the wiki: > http://chattyfig.figleaf.com/ > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106430 > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > To unsubscribe send a blank e-mail to: > Normal Mode: flashcoders-unsubscribe@(protected) > Digest Mode: flashcoders-digest-unsubscrive@(protected) > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > Supported by Fig Leaf Software > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > Be sure to check the archives and the wiki: > http://chattyfig.figleaf.com/ > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106435 > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > -- ------ > To unsubscribe send a blank e-mail to: > Normal Mode: flashcoders-unsubscribe@(protected) > Digest Mode: flashcoders-digest-unsubscrive@(protected) >
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106443 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |