Copy link to clipboard
Copied
Hello guys,
I need some help making a program that count vowels.
The user inputs a sentece, then clicks a button and the OutputText.text=The number of vowels
I'm quiet sure where to start the function.
I've tried
trace(string.match(/[a|e|u|i|o]/gi).length);
but the output in this case renders to Flash CS and not to the Flash player or OutputText.text
use:
var n:int = string.match(/[a|e|u|i|o]/gi).length;
OutputText.text=n.toString();
Copy link to clipboard
Copied
use:
var n:int = string.match(/[a|e|u|i|o]/gi).length;
OutputText.text=n.toString();
Copy link to clipboard
Copied
This worked!
Once again, thank you kglad!
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now