Skip to main content
_Waylander_
Inspiring
April 9, 2018
Question

Breaking sentence text into words

  • April 9, 2018
  • 1 reply
  • 1144 views

Here may be a simple update.  When breaking Paragraphs or Sentences of text. Could it break into whole words, before it breaks into separate Glyph and then shapes.

This would help when creating Kinetic or animated text animations, to quickly make the words symbols. Rather than having to copy paste each required word.

    This topic has been closed for replies.

    1 reply

    JoãoCésar17023019
    Community Expert
    Community Expert
    April 10, 2018

    Hi.

     

    Here is a script that breaks apart text fields and turn the resulted chars into words. There are several optional parameters you can choose. The default values are:

     

    Word instance prefix: "word"

    Word symbol type: "graphic"

    Char symbol type: "graphic"

    Word registration point: "center"

    Char registration point: "center"

    Convert chars to symbols: true

    Make words (set false in case you only want the chars converted to symbols): true

     

    * "movie clip", "button", and "graphic"

    ** "top left", "top center", "top right", "center left", "center", "center right", "bottom left", "bottom center", and "bottom right"

     

    You can leave as it is to just have the text fields converted to words.

     

    How to use:

    - Drag and drop the script file over the Animate CC IDE;

    - Execute the script file in the OS file explorer;

    - Call it from Commands > Run Command....

     

    For animators, I think the best would be to save the script in the default commands folder and then assign a shortcut for it.

     

    Text Fields to Words JSFL script download:
    [July 2024 link update]: 
    https://bit.ly/4dfK1qM

    Text Fields to Words.zip - Google Drive

     

    Preview:

     

    Please test it and see if you find any error or if there is something that can be improved.

     

    I hope it helps.

     

    Regards,

    JC

    Legend
    April 10, 2018

    Why is so much of your script dedicated to making sure that things will have spaces in them that should always already have spaces in them?

    JoãoCésar17023019
    Community Expert
    Community Expert
    April 10, 2018

    Haha.

    I just wanna make sure the user won't insert blank spaces.