Why would you want to switch actionscript versions in the middle of a program? Being able to do that wouldn't even make sense, everything would fail because it'd be in a different syntax.

I was assuming you meant from AS2 to AS3 or vice versa.