convert lowercase to uppercase

Hi
most of the photoshop users wanted to have a tool with in flash to convert the textfiled data to uppercase by a click as they can do it in photoshop.
so just developed a jsfl command to do that select your text filed on the stage and run the command it will convert all text data to uppercase.

let me know if any additions required.
save the following code using notepad with filename “uppercase.jsfl”

open the file from with in flash by selecting commands >> run command and select the saved file “uppercase.jsfl” .


uppercase = function(selIndex)
{
var textLength = fl.getDocumentDOM().selection[selIndex].length;

if(textLength == undefined){
return;
}
var lower_string = fl.getDocumentDOM().selection[selIndex].getTextString();
return lower_string.toUpperCase();

}
var theSelectionArray = fl.getDocumentDOM().selection;

for(var j=0;j < theSelectionArray.length;j++){
theSelectionArray[j].setTextString(uppercase(j));
;
}

Leave a comment