Receive eventHandler when flash loads

I have little problem in my flash application… It doesn’t receive keyboard event, when the page loads the user need to press spacebar to start my application… But it seems my flash doesn’t get the onKeyDown event… I need to click first the application so that it can get the event. Is there any solution for this problem or work around?