How do I change all static text to uppercase?

I am looking for a feature like in CorelDraw where I can select a bunch of text items and change to all UPPERCASE in Flash CS6.

Is there a fast way to do this?

3dron

JSFL! This should do it:

var sel = fl.getDocumentDOM().selection;
for (var i = 0, n = sel.length; i<n; i++) {
	if (sel[i] instanceof Text) {
		var runs = sel[i].textRuns;
		for (var j = 0, m = runs.length; j<m; j++) {
			runs[j].characters = runs[j].characters.toUpperCase();
		}
	}
}

Save this as Convert to Uppercase.jsfl and open it from Commands > Run Command… in Flash. It should convert selected text fields into uppercase.

This I just did off the top of my head; there might be more capable solutions online that account for other complications I’m not thinking of. This should do the trick for most cases… probably :wink:

1 Like

I think you misread the situation. OP had a bunch of existing, already placed static text, which isn’t really addressable via ActionScript. It being static also means that there won’t be any change events.