Detecting OS version in flash MX2004

Hello all

Just a quick question. How would i go about getting the type of OS in flash.

So either windows or mac version like xp or 98, Or OS 9 and OS X.

Any help would be great.

Thanks