If your POS terminal attaches to the cash drawer through a
serial cable, you just open the serial port and send a character 27
to the serial port. Tons of old scripts out there on doing that.
Doubt if you could do it directly from Flex, but you can call a
shell script from php using HttpService.