User Tag List

Results 1 to 5 of 5

Thread: Switching or Replacing Text

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Switching or Replacing Text

    Let's say in the text box the user enters Hello World. How can I have it switch the letters. For example the letter h will be c, e will be a, l would be g, and so on. You would end up with something like Cagg....

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    May 2007
    Location
    Brazil
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching or Replacing Text

    maybe you can use string parser 2, but I don't know if you can manipulate each letter separately

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching or Replacing Text

    You could run a fastloop when they finish entering the text in the field and then swap out the letters. But if you want it to happen WHILE they are typing in the letter, I don't know if that is possible.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Ryan's Avatar
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    1,279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching or Replacing Text

    you could use the left, right and mid functions

    eg.
    String = "hello world"

    String = "c" + right$(String, 10)

    String = left$(String, 1) + "a" + mid$(String, 2, 9)

    You can also combine it with Len to get the string length of the input so its more dynamic.

    Otherwise look into the "Substring Replace" extension. It's for replacing many occurrances within a string.

    For example, I had a comma delimited file, and I wanted to replace all the commas with spaces, so I used substring replace "," with " ". The entire string is then updated with the newly replaced characters.

    The extension is pretty easy to learn if you look at the examples that come with it.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching or Replacing Text

    Substring Replace is probably the easiest option. It's designed for this exact task of replacing strings within other strings. It might just get confusing if you have all of the letters of the alphabet.

Similar Threads

  1. Replacing name in a dialog
    By Fimbul in forum File Archive
    Replies: 2
    Last Post: 11th October 2009, 08:47 AM
  2. replacing
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd July 2008, 04:21 PM
  3. Sprite Replacing
    By Benicle in forum Hardware Accelerated Runtime
    Replies: 28
    Last Post: 17th February 2008, 03:21 PM
  4. Replacing PowerFunction with LUA?
    By JSJ in forum File Archive
    Replies: 3
    Last Post: 14th August 2006, 03:01 AM
  5. Text blitter color-replacing?
    By Alonso in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 14th July 2006, 06:09 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
  •