User Tag List

Results 1 to 3 of 3

Thread: restrict number of paragraphs in a string

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    restrict number of paragraphs in a string

    so I'm trying to create a block of text for an online chat function. I was wondering if it was possible to restrict the number of paragraphs in a string. So is it possible doing:

    Number of Lines in String < 5
    Set alterable string to: Current String+NewLine$+Message

    Number of Lines in String > or = 5
    Set alterable string to: Current String- 1 paragraph+NewLine$+Message

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: restrict number of paragraphs in a string

    i assume i could have 5 separate strings outside the frame, one for each paragraph. Then when a new message comes, update each paragraph and remove the oldest one, then set the text box as all of those combined? Would that work?

  3. #3
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: restrict number of paragraphs in a string

    Yes, you have the right idea... I would actually store them in a List object, adding the strings to the end, and removing the first line when it had over five lines. Then you can display the lines of the list object in a String or anything else.

Similar Threads

  1. Number of lines in a string?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 8th May 2015, 11:20 AM
  2. Get the number of characters in a string
    By UltraHammer in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th September 2013, 03:33 AM
  3. Check for number in a string
    By Panchos in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd December 2012, 08:44 PM
  4. [bug] String Paragraphs: 0 or 1 based index??
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th August 2012, 04:03 PM
  5. Paragraphs in alterable string
    By algiz in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th July 2011, 04:26 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
  •