flash to js