Yes, this is exactly what I mean by "scripting". You would have to do something like this pseudo code:
- echo "var wordList:Array = new Array( ";
-
while(! word_list.empty() )
-
{
-
echo "\"";
-
echo word_list[0];
-
echo "\", ";
-
word_list.erase(0);
-
}
-
echo " );";
You don't have to generate the whole .as, just the long and boring part that is easy to automate.
As for keeping people from putting your flash on their website... don't bother, it won't happen. The biggest corporations can't figure out how to keep binary machine code executable warped through the 9 circles of hell (read: SecuROM) from being mass copied, so your Flash object stands no chance. Some basic URL checks will be effective enough against people who know too little to rip the decryption key out of the dissembled script.
If you still want to go through it, you will probably want to take a look at
http://code.google.com/p/as3crypto/