Unity 3.5 Beta input doesn't work in Flash builds

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:
`
#pragma strict

function Update () {

var horizontal:float = Input.GetAxis("Horizontal");
transform.Translate(horizontal, 0, 0);

}`

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.

Hi,

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.