Ali Qureshi, is a web developer based in Lahore, Pakistan. Since 2001, Ali has developed creative, interactive, usable & successful web apps, Facebook apps, web portals and have authored WordPress plugins & themes. Ali has worked as a Software Architect, SEO Consultant, project manager, PHP & Flash AS3 developer, and sometimes as designer. He has also reviewed three books for Packt Publishing on jQuery and Mobile development. He is currently developing WordPress themes & Plugins and mobile apps APIs. When not working, he spends his time exploring and trekking.

[AS3] 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…