Here's how to get rid of trailing whitespace from all your files:
# Strip trailing whitespace from files that end in .as.
# Change this to match your programming language.
# I'm not sure if the -i flag is supported by all OSs.
find . -name '*.as' | xargs sed -i 's/ *$//g'
# See if the changes look reasonable.
# There should be no changes that aren't whitespace changes.
git diff -w