Skip to main content
Known Participant
February 20, 2009
Question

Use javascript to call actionscript

  • February 20, 2009
  • 2 replies
  • 769 views
Hello There,

I have been using a really nice setup, from Phillip Hutchison to communticate from Captivate 3 using code swfs on a captivate slide that will communicate back to AS3 from AS2 (due to captivate 3) via an as2 proxy .
Would there be a way that I could use javascript on a captivate button (or object) that would call a function via the same process? Another way to say this, can I call an external callback function from javascript on a captivate button?

Any tips will help,

Thanks,

eholz1
This topic has been closed for replies.

2 replies

eholz1Author
Known Participant
February 23, 2009
Hello krishna kiran,

thanks for the info on this. It is helpful indeed.
I am pushing for Captivate 4 even in light of "buget" cuts.

eholz1
Participating Frequently
February 23, 2009
Would there be a way that I could use javascript on a captivate button (or object) that would call a function via the same process?

Yes.
1. Create a function (say myJSfunction )inside the html(that loads the final CP swf.).
2. Have the code to call the external interface function within myJSfunction.
3. Set the action of button to execte JS and just have the java script as "myJSfunction();"
4. Insert your code swfs on a captivate slide that will register the external callback function.

Now when you click the button myJSfunction gets called which will call the external callback function inside your code swf.

Also note that with CP4 you can publish directly to AS3 so you wont need to use the proxy any more.