flash to javascript