User Tag List

Results 1 to 6 of 6

Thread: Word Count

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Word Count

    I know there is a way to count the number of words in a string, but I have searched the forums and cannot find any examples or requests. Does anyone happen to know how?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Word Count

    1. Insert the String Parser 2 (SP2) object - it should come with one of the bonus packs
    2. On start of frame, add " " as a delimiter to SP2
    3. Set the source string of SP2 to your string
    4. Use the "get number of elements" function of SP2

    And yes, this has been asked before (but, to be fair, it was on the old forum).
    .:::.Joshtek.:::.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Word Count

    Thanks, and sorry, I forgot to check the old forum.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on
    LIJI's Avatar
    Join Date
    Jun 2006
    Location
    Israel
    Posts
    1,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Word Count

    Adding more non-letter (anything but for A-Z, a-z, 0-9 and other signs that you want to count as a letter, like ' or `) will make it better.
    You do not have to worry about "empty words", if someone uses 2 spaces for example, SP2 ignores them.

  5. #5
    No Products Registered

    Join Date
    Sep 2006
    Location
    Italy
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Word Count

    Maybe regex extension is better way to count word.
    Try using "[[:alnum:]]+" in the regular expression field.

  6. #6
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Word Count

    The reason I needed that is because I am making an online typing game in which a person can only type three words. After they type three words, it goes to the next person in the game and they add on with three more words. Just using a delimiter of " " works fine for this purpose.

Similar Threads

  1. Individual word by word string comparison?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th May 2013, 05:52 PM
  2. Highlight text word by word - grammar exercises
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th September 2011, 05:36 PM
  3. Newgrounds count vs. mochi count
    By Tuna in forum SWF/Flash Export Module Version 2.0
    Replies: 9
    Last Post: 20th September 2010, 08:37 PM
  4. Word Count Example
    By nivram in forum File Archive
    Replies: 3
    Last Post: 17th August 2009, 04:29 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
  •