User Tag List

Results 1 to 7 of 7

Thread: Replacing numbers with letters

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Replacing numbers with letters

    Hey :-)

    I want be able to input a number sequence into an edit box like:

    7-15-21-0-1-1-8-19-14-13-14-5 etc and so on
    And when i push a button it will then convert the numbers to a letters. where:
    0=A
    1=B
    2=C
    3=D etc
    and the result to be shown in a string or another edit object.

    I think i can use the string parser here but how can I do this?

    Best Regards
    Decal :-)

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Replacing numbers with letters

    Insert the String Parser 2 object, and then:

    chr$( "String Parser", 65 + 5)

    Where 5 is the number (that example would give "F")

    EDIT: Well, that's for one number. I guess you can figure out how to do the whole string yourself? (hint: A fastloop combined with either String Parser's list tokenizing, or the String Tokenizer object and a delimiter of "-").

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Replacing numbers with letters

    I managed to get something using the string tokenizer, list object and the inbuilt fast loop.

    HERE is the file


    It works 80% of the time, and 20% of the time the last 4,5,6,7 letters is the same. but if I generate again it works.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Replacing numbers with letters

    Man, it doesn't need to be that complicated.

    Try this: http://mfa.aquadasoft.com/view/1290607632-Example

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Replacing numbers with letters

    Unnecessary to use both Parser and Tokenizer though.
    Plus, the Chr$() expression is not really needed since you can also have a string that contains the alphabet ("ABCDEFG...") and then use Mid$("ABC",X,1) to get the Xth char.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Replacing numbers with letters

    Thanks alot for the example Jamie :-)
    That was alot simpler than the one i made :-P

    I didn't know of the char function in string parser 2 :-)

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Replacing numbers with letters

    Quote Originally Posted by Looki
    Unnecessary to use both Parser and Tokenizer though.
    Tokenizer doesn't reparse the string every time you retrieve an element.

    Quote Originally Posted by Looki
    Plus, the Chr$() expression is not really needed since you can also have a string that contains the alphabet ("ABCDEFG...") and then use Mid$("ABC",X,1) to get the Xth char.
    Slower!

Similar Threads

  1. Random Numbers and expiring the result numbers.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th April 2013, 04:11 PM
  2. Replacing numbers with letters:FILE:
    By Decal in forum File Archive
    Replies: 0
    Last Post: 23rd November 2010, 08:43 PM
  3. unknown letters and numbers compare two vals?
    By bubba_damage in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 8th October 2010, 10:02 PM
  4. replacing
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd July 2008, 04:21 PM
  5. Replacing PowerFunction with LUA?
    By JSJ in forum File Archive
    Replies: 3
    Last Post: 14th August 2006, 03:01 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
  •