Detect browser or IDE?

Hello -

I’d like to know how to get AS3 to detect if it is running in the IDE or in a browser. That way I can disable certain functionality and trace it out instead while testing.

Thanks!