User Tag List

Results 1 to 5 of 5

Thread: Pulling a specific line from a text string?

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleMac Export Module

    Join Date
    Sep 2006
    Posts
    198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pulling a specific line from a text string?

    I have a text string displaying in a String object that looks like this:

    9923
    7132
    4460
    4119
    3611
    2293

    I want to use counters to display those though. Is there a way to make Counter_1 use line 1, Counter_2 use line 2, etc? The numbers in the text string will change frequently, but I'll always want line 1 to go to Counter_1, etc.

  2. #2
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,705
    Mentioned
    62 Post(s)
    Tagged
    3 Thread(s)
    You can enter multipe paragraphs in a string and then choose which paragraph to display at runtime, using expressions. Is this what you meant?

  3. #3
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleMac Export Module

    Join Date
    Sep 2006
    Posts
    198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Simon, it's all considered one paragraph, unfortunately.

  4. #4
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleMac Export Module

    Join Date
    Sep 2006
    Posts
    198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, I have something that works. It's not elegant, but what's going on in this frame is so simple (just high score display) that if it's not the fastest it doesn't matter. Whether it takes a few hundredths of a second extra to display is negligible. Here's what I did:

    The information is coming from the String Parser. So I fed that into a List, which adds a new line with each score. Then I use a Counter to display the numbers. Ten high scores means I have ten counters. The reason I'm using Counters instead of just the List is that I need to modify the score to include two decimal places (I multiply the score by 0.01).

    Yes, someone who knows what they're doing could easily save a bunch of steps and just make the parsed file do the decimal multiplication and feed that directly into the List, then use the List itself for the display instead of the Counters, but my brain hurts too much already.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to hear you got it to work, i was about to say that you can use String Parser and set newline$ as the delimiter.

Similar Threads

  1. Rich Text Object - Get specific line and letter
    By HadHaw in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd February 2013, 07:28 PM
  2. Changing color for specific words in a string
    By gkinfinity in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 21st February 2012, 08:29 AM
  3. How to test if a string object contains a specific text
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th January 2012, 10:43 PM
  4. Help Get specific line text
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th February 2010, 09:17 PM
  5. Clearing the top line of text is String Parser.
    By ACESpark in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 25th June 2007, 03:20 PM

Posting Permissions

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