How to add/make commands?

I want to make some commands for my CPPS like in this video: https://www.youtube.com/watch?v=yVSTxvIRwSo

You’ll need to have knowledge of Python, handlers and SWF files.
Many commands (especially the transform command) would be extremely hard to implement.