Add a script as a front-end for Flex, to work around various problems,