Skip to main content
georgem94973207
Participant
September 23, 2016
Question

Text field have to be assigned Variables to access through javascript

  • September 23, 2016
  • 1 reply
  • 212 views

Hey ,

I have been trying to use XML + Javascript to control what is shown in a text caption field in Captivate however having to create a variable and assign it to each text field throughout the captivate project is an extra, time consuming step. I have tried this without assigning a variable but i have had no success.

If anyone knows whether this has to be done or there is way around this it would be much appreciated.

Thanks in advance

George

This topic has been closed for replies.

1 reply

RodWard
Community Expert
Community Expert
September 23, 2016

For SWF and most HTML5 output, text objects such as captions and smart shapes get converted into graphics when published.  So unless you insert the text in the object as dynamic text from a variable, it basically gets nailed in as an unchangeable part of the final graphic.

Responsive projects are more likely to offer you some freedom in this area, but then they have lots of other limitations to live with as well.

Why do you really want all of the text in the project to be dynamic?  Are you trying to translate it or something?

georgem94973207
Participant
September 23, 2016

The text doesn't need to be dynamic it was just trying to save some time. If the project had to be made in English and then all again in a different language it would be a lot more time consuming, Whereas if there were 2 xml files, 1 being English and 1 a different language, the correct xml could just be pulled in with the chosen language displayed in the corresponding text boxes.

RodWard
Community Expert
Community Expert
September 23, 2016

For translation you can use File > Export > Project Captions and Closed Captions to export all the text in an MS Word doc that has columns for the original language and target language.  But this document doesn't actually contain every single bit of text that might appear in the project.  So it's not a perfect solution.

Your idea has been mooted around this forum before and has a lot of merit.  I recommend you add your name to the list of people that have logged something similar as an enhancement request.  Can't hurt.