Custom keys programing problem

2 posts

Flag Post

I want to make a custom key setting system,but I have a problem :

When I use a variable to store a Flash key number,it often works,except for some keys like arrow keys.


For example :

If I set “root.ct_as1 = 37” (37 is Left arrow key)

And the statement “Key.isDown(root.ct_as1)” will be always false.


But when I assign it to other key numbers (ex : a~z) it works fine……so do I do something wrong?

Flag Post

works for me:

_root.mychar = 37; _root.onEnterFrame = function() { if(Key.isDown(_root.mychar)) trace("bang!"); }