Flash app controller.

Here is the code for the Flash app controller.