A script is causing Adobe Flash Player to run slowly

I know it’s a common error, and I know it’s related to an infinite loop, usually. In may case, this is different.
Here http://myrtana.xhost.ro/wordsearch/wordsearch.swf I have a wannabe word search game. On my computer it runs without any problems, but on the website it crashes.
I’m using a big “while” in which are included two random generators, so this must be the problem. In fact, I’m sure there lies the problem, because before adding this part, the game ran well on the website.
My question is, does anyone know **why **is this happening? Did anyone else ever encountered something like this?
Thanks.