copy+paste from eclipse to flash does not work
When I try to copy code from eclipse and paste it in the actionscript editor within Flash (CS3 or CS4) nothing gets pasted. Flash does detect there is something on the clipboard and does try to paste, but no content is added.
I can copy paste from eclipse to all other pieces of software running on my computer that have some form of input field.
Both eclipse and flash are set to utf-8.
This annoyance occurs on my macbook with snow leopard installed.
update: I made an interesting discovery just now, when I copy in Eclipse, then paste somewhere else (so just paste) I then can also paste in Flash.
update 2 I've exhausted anything I can try and have given up by blaming Adobe. one extra thing I noticed was when I copy in Eclipse, select text in flash and paste, the text selected gets replaced by nothing. It's like with flash stopping after encountering a badly encoded character.开发者_开发知识库
I'm guessing the bug is within Flash's editor; it's had a long history of gripes from users.
For my projects, I usually create an external .as file and then just load it into my FLA. In your case, it's as easy as:
Copy your current code into an external .as file and save it in the same directory as your .fla.
Let's assume you save it as main.as. In the place where the code used to be, put in:
include "main.as"
This will solve your problem without having to go through your workaround. External .as files are also generally a good practice if your code is any significant length or there's a chance that someone besides you will be looking at it :)
Seems like a bug in your editor. But yeah, try your own solution.
update: I made an interesting discovery just now, when I copy in Eclipse, then paste somewhere else (so just paste) I then can also paste in Flash.
I've seen similar problems in Eclipse on Windows; in certain Eclipse file-type editors the copy and paste don't work properly. If you are using the HTML or JSP editor in Eclipse try using the text editor and see if your problem goes away. On Windows copy/paste are CTRL-C/CTRL-V, but they are also CTRL-INS/SHIFT-INS. The latter keystrokes sometimes work for me when the others do not.
精彩评论