When you right click a .as file in a module and choose "Run '<scriptname>' Ctrl-Shift-F10", you seem to have no control over what application is used to execute the resulting .swf file.
Is there a way to choose what application should be run in this case? If not it woudl be great if there was one. Note that this is NOT the same as the "Run/Debug configurations".
Under my Gnome-based linux distribution it constantly launched totem, independent from what I had configured as the .swf default in Nautilus. In the absence of finding a way to change the application IDEA chooses to launch, I dug into it and found this post which revealed that IDEA uses java's getDesktop to figure out what to run. Digging further, for linux this uses Gnome functions to figure it out.
After much further digging, I came up with a solution/hack that works for me, and hopefully helps someone else. Here's how (with some explanation):
If you look in '/usr/share/mime-info/gnome-vfs.mime' you will see that .swf files are tagged as the 'application/x-shockwave-flash' MIME type. grepping for this in /usr/share/applications I saw the root cause of the totem infatuation:
What you need to do is make a replacement application for Gnome to use. This can be overridden for the local user. First, you need to make a new application type with the following console command:
gnome-desktop-item-edit ~/.local/share/applications/ --create-new
I then ran 'xdg-user-dirs-update', although I don't know if that did anything (it seemed relevant).
Then you need to make the local association. To do this, add this line to '~/.local/share/applications/defaults.list':
where in my case when I made the new Gnome application I called it 'flashplayerdebugger' and pointed it at the same.
After restarting IDEA, direct script running now works, as does debugging since I set it to the debugger version of the player.
Hopefully this helps someone else, too.