I've been trying to fix this for about 2 days or so, and i've searched all over the ask and forums for an answer.
Here's my question: I have been trying to just do a very simple test deployment for Flash but it seems that no matter if I use Input.GetAxis or Input.GetKey it will work in unity's editor, but it will not work in the Flash.swf file that I build it to.
Here's my build: I've just made a cube that has a script attached to let the user move it left or right based on the arrow keys or 'A' or the 'D' keys.
The script is:
and the script is attached to the cube. Again it works perfectly fine in editor but doesn't work at all when it's deployed to Flash. also when I use Input.GetKey it doesn't work.
It's not your code... It's some bug I was fighting with too. Try clicking on the Flash movie and then press the direction keys, it will work.
For some reason the Flash object loses its focus in the html page! So I was thinking about starting with some button saying "Click to Start" or something in order to get the focus.
Hope this solves your problem.