Code built for Flash player 8/9 hangs but OK with 6/7

Using FlashDevelop 3.3.4 RTM, and an AS2 Project I’m currently converting Jeremy Moseley’s excellent and compact Battletanks from AS2 to AS3.

After a few seconds, the game will hang (script goes into an infinite loop somewhere.)

Happens when I build for Flash player 8 or 9 (Properties > Platform Target).

But plays OK when built for Flash player 6 or 7.

Doesn’t matter if Debug or Release.

Running in Flash player 10.3.183.10

Using Windows XP SP3, with all latest updates, at least a couple of days ago.

Have noticed it seems to hang when two tanks are shooting at each other, so that is the region of code I’m going to explore, starting with the lineOfSight() function.

I’m not too knowledgeable about Flash player bugs/language changes between versions, so while I’m digging around the source, if anybody has any tips, they would be most appreciated.

Code below, and Dropbox link to ZIP of FD project files here:

http://dl.dropbox.com/u/4809354/BattleTanksAS2.zip

You can’t target player 6 /7 (or 8) when using actionscript 3?