Using Flash to do Screen Captures of Applications

I saw this program ‘asap’ (i think it’s called, will try and get more info about it) but it’s flash that uses the Flash player settings screen to setup a way of capturing the users desktop or any application currently running.

How can this be done? I thought that the only limitation in flash is to not interact with the users machine (writing files etc) because this is a security risk.