User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 18 of 18

Thread: Letter-individual checking

  1. #11
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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

  2. #12
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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.

  3. #13
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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!

  4. #14
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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!

  5. #15
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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).

  6. #16
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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

  7. #17
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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

  8. #18
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    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!

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Individual Colours
    By Game_Master in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 30th March 2012, 06:38 PM
  2. are you an individual or a company?
    By Bigfoot in forum iOS Export Module Version 2.0
    Replies: 13
    Last Post: 14th January 2012, 12:05 PM
  3. Individual Health
    By shoyu95 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st March 2011, 03:01 AM
  4. Individual sensors for enemies?
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th February 2009, 01:16 AM
  5. Letter-by-letter text - next line if word too long
    By DistantJ in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th February 2008, 06:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •