I believe this is the correct firstLineMatch for AS3: package\s?([\w.]*)\s?{
I don't believe there is a correct way of doing this. Or to avoid the languages Michael's identified:
[...]And you need to make sure it can't get triggered in D, Doxygen, Groovy, Java, JavaScript, Processing, Scala[...]
I used \bAS3\b because comments are as likely to be found on the first line as package declarations. So, for anyone who wanted to, adding 'AS3' would help TM identify ActionScript 3 over ActionScript files.
I've also taken the liberty of adding 'AS3' into the comment header for the same reason.
Cheers, Simon