anything can be decompiled, you can at most make it harder for the casual pirate...
The determined pirate will only become more determined and will probably have tools to counter the effects of most "code protection" tools.
In my opinion if you optimize the code enough it will make it pointless to decompile because the decompiled code will be just as confusing as the bytecode.
If you are really desprite you could take a packing approach, compile your swf encrypt it, make a small flash app that contains the encrypted swf and decrypts it upon execution, it will be written to live memory but it will make it at least twice as hard to decompile.
Don't bother asking me how to do this in AS, because I've never touched Actionscript, I'm not even sure if its low level enough to do this. Its actually a technique used to protect maleware from detection; packing and encryption.