I am a web & mobile app developer based in Lahore. I have been developing creative, interactive, usable & successful web apps, web portals, php and Flash action scripting, REST apis, WordPress plugins & themes. In recent years, I have worked on Ionic, Angular and TypeScript for hybrid mobile apps, Flutter & Dart, React & React Native, and Swift native iOS mobile app development.

Convert string to TitleCase in Flash using ActionScript function

Unfortunately and surprisingly, Flash AS3 does not have a TitleCase function a la ucwords() in PHP todate. Following ActionScript 3.0 function will let you do just that: function titleCase(txt:String):String{ txt = txt.split(" ").map(function(myElement:String, myIndex:int, myArr:Array):String{ return myElement.substr(0, 1).toLocaleUpperCase() + myElement.substr(1); }).join(" "); return txt; } // you’ll use this function like this var heading:String =…