Some bits of AS3/Flex code i thought people might be able to use