Try the script I have pasted between the AS tags. When you copy and paste a script as plaintext on the forum (like you did in your last post) it converts the < symbol and makes the forum think everything on that line is part of an HTML tag.
If that isn’t the problem, then the answer can be found in this line
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 8: Unexpected ‘}’ encountered
Apparently there is a curly bracket there that shouldn’t be.
I tested all the code I pasted in here so anything extra added to cause the error had to be added manually.