Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Haha.
I just wanna make sure the user won't insert blank spaces.
Copy link to clipboard
Copied
I wanted to thank you for posting this code. It works well, and will save a lot of time thank you again.
It does seem odd that a feature like this was not already part of Animate, considering all the years of Flash...
Copy link to clipboard
Copied
Excellent! I'm really happy this is helping you.
And I totally agree.
Please, let's make this feature request. Who knows?
Thank you.
Regards,
JC
Copy link to clipboard
Copied
Thanks for posting this Joao, I'll be using this a lot - I had a more basic version that only split the characters (and stored them in a single symbol) but I was trying to think of a way to split by word. This is very elegant.
Copy link to clipboard
Copied
Awesome!
Please let us know if you encounter any issues.
Regards,
JC