Skip to main content
Inspiring
August 28, 2015
Question

How do I add Javascript to a project so that it works in Flash?

  • August 28, 2015
  • 2 replies
  • 969 views

This is an embarrassingly rookie question, but I want to know how to use Javascript in Captivate so that it also works with Flash output.

Let me tell you what I am doing, which works with HTML output:

  • There is a text caption on my slide with a custom variable, numberOfClicks as its content.  The variable has an original value of "0".
  • There is a click box on the slide
  • When the click box is clicked, a very simple advanced action is triggered. The advanced action executes the following script in the current window: numberOfClicks = numberOfClicks + 1;  I know you can use Adobe's built-in "increment" action for this.

Result - When I preview this in HTML5, you can click the click box and watch the value of the variable increment.  When I preview in Flash, the value remains 0 when I click the click box.

How do I get this to work in Flash?

This topic has been closed for replies.

2 replies

Inspiring
August 28, 2015

As you see, I simplified it some more, but I still have the same problem that it doesn't work like I want it to in Flash.

Lilybiri
Legend
August 28, 2015

So it is JS, not an advanced action. How did you test? You have to deploy also the Flash version in a browser, which means you have to publish it.

Inspiring
August 28, 2015

Yes, I published once as HTML and once as Flash. Here are my Flash settings.   Maybe it is an issue with my browser?

Lilybiri
Legend
August 28, 2015

That is not JS, but advanced actions, or do I misunderstand?

This should work perfectly, it is such a simple action. And SWF output has a much longer history than the new HTML5.. Can you post a screenshot of the advanced action?

Inspiring
August 28, 2015