ActionScript is the scripting language of flash whereas Javascript is used in HTML5, so when you are going convert Flash to HTML5, converting script is the first step that is taken