Convert ActionScript 3 to TypeScript on web