Forum Discussion
Retrieve text from a shape
is there a way, with a trigger or with JavaScript, to put the text in a shape into a variable?
Thank you. I do it a little differently in Captivate. It's JavaScript interpreter is very different.
- MathNotermans-9Community Member
There are always solutions... but before jumping on this... why you need the text thats in a shape ? A sample always helps best ;-)
- JohnnieMooreCommunity Member
I am creating a crossword puzzle. I can accomplish what I want by having a variable for each square. To change the puzzle, I have to reassign each variable. Doable. If I could just change the character in a shape and have the programing get the character, it would be quicker and make it easy to view the entire puzzle.
- MathNotermans-9Community Member
I have seen Storyline samples for crossword puzzles. Most use external libraries and use a WebObject to show the crossword puzzle. I made a sample quite a while ago using GSAP and its TextPlugin to do something similar.
- MathNotermans-9Community Member
As said...this is possible...but all depends on how and why you need it. Showing quick and dirty sample here getting all texts in Storyline.
- JohnnieMooreCommunity Member
Thank you. I do it a little differently in Captivate. It's JavaScript interpreter is very different.
- JohnnieMooreCommunity Member
I am also trying to expand my capabilities with JavaScript. I am 75 and don't learn as quickly as in earlier years.
- MathNotermans-9Community Member
the crosswords-js library makes this easiest.
https://github.com/dwmkerr/crosswords-js - JohnnieMooreCommunity Member
Much appreciated.