Start of Frame
Run Loop "string" len(paragraph$( "String", 1) times
On loop "string"
Mid$( paragraph$( "String", 1), loopindex("string"), 1) = "a"
Set Colour to Red


Start of Frame
Run Loop "string" len(paragraph$( "String", 1) times
On loop "string"
Mid$( paragraph$( "String", 1), loopindex("string"), 1) = "a"
Set Colour to Red

I made another example for you:
http://cid-b1e7ee094271bbda.office.live.com/self.aspx/Public/Alphabet.mfa
Make sure you have the "String Parser 2" extension installed.
It basically works like this:
* Run a fastloop to check each letter.
* The loop index tells which letter to look at (eg. if loopindex = 0, it's looking at the first letter in the string).
* Get the ASCII code of the selected letter.
* Check if the code is exactly 65 more than the loopindex (the ASCII code for A = 65, B = 66, etc).
It just saves on having a different line of code to check each letter.
Thanks!
Having a problem with the String Parser though.
Sure the example you set up works for the english alphabet perfectly!
The problem is though, the task is for learning Swedish, and our last letters in the alphabet are åäö.
The method used doesn't support these three letters in the end...
Any ideas on how to get around this?
Thanks!
EDIT:
Still having the same problem, but I need help with another now..
I noticed the wrong letters turn red, but the right ones stay black..
Any ideas?
Thanks!
Hello again guys!
Still having the same problems..
The checker checks the english alphabet but I'm checking the swedish one, with the 3 last letters åäö not being able to be correct in the parser..
Any ideas on correcting that?
And the correct letters stay black, how do I turn them green whilst the wrong ones remain red?
Thanks!

Firstly, did my example actually do what you wanted (apart from the problems you mentioned)?
I really wasn't sure if I was even on the right track.
The Swedish alphabet thing shouldn't be a problem.
I don't have any more time to do it right now, but I'll get back to you with a solution (hopefully).
Well yes, mostly..
It's just those two problems, with the English -> Swedish conversion and the colour for the correct ones..
Tried an On loop with the same code under it but "equal" instead and to then turn it to green, but that didn't work..
But I'm also looking for a solution to restrict the number of characters for the textfield?
I already tried a condition which checks the editbox for 29 characters and then puts it to read only.
But that caused a problem, you can't erase a letter if you're wrong somewhere to be able to correct it to "play" again

I thought of a quick fix:
http://cid-b1e7ee094271bbda.office.live.com/self.aspx/Public/Alphabet2.mfa
Haven't found a very good way to limit the number of characters in a RichEdit box though![]()
Hmm just finished trying it out..
That at least solved one issue, the one with green/red.
But, the issue remains with the swedish alphabet
It won't recognize the "åäö" in the end
EDIT:
Solved the "åäö" issue!
I just reverted them from capital letters to small ones..
Don't know why that solved it, but a solution nonetheless!
Thanks so far mate, been a great help!
As for the 29char limit, I don't know how to solve that, but what would you say about just limiting it to 29 by making it read only and when the player corrects it, he will be given the option to just reset the editbox to play again?
I don't know about it, it seems quite weird if he types the wrong letter in the end and can't remove it...
EDIT(again):
Well your 29 char limit actually works as well as it has to work!
Noticed a bug though ^^..
If you've typed in the alphabet & corrected it once.
You can't do it twice without the letters being green as you type in, but that's no biggie, I'll fix that!
Thanks for the help mate!![]()