The following worked for me, but was only tested in form fields and the location bar. An important note is that the target text field must be active/focused for this to work… i.e. the cursor must be in the text field to type into as if you were going to start typing there. If you try to send the app some keystrokes without any text field being focused, you’ll just get a bunch of error sounds and no reaction. I don’t have a shockwave page to test on, but I would think it would work similarly. You should be able to get the keystrokes to receive in the shockwave object, because you’re telling the app to simulate the keystroke, not the shockwave itself… which is how the app would handle the event were it an ‘actual’ keystroke.
tell application "Safari"
activate
end tell
tell application "System Events"
tell application process "Safari"
delay 0.1
keystroke "f"
keystroke "a"
keystroke "s"
keystroke "t"
keystroke "s"
keystroke return
end tell
end tell