How to do browser and os detection in flash

Like on this page, but i want make it in flash. And how to show it on percent like www.download.hr on the right you will see that what i talking about just i want it in flash.
http://www.kirupa.com/web/browser_detect.htm
plz help me