Captivate communicating with Flash

I think it’s a little strange that Captivate is owned by the same company as Flash and exports ‘swf’ format, yet there’s no option to simply dispatch a Flash event. Which makes communication between a Flash holder and the Captivate movie problematic.

There are a few solutions(i.e. hacks!) out there:

  1. Import a flash movie on the final frame of the movie, which contains the actionscript that we wanted to execute, perhaps by calling a function on the root…
  2. pipwerks blog had a very interesting lateral thinking solution: Captivate actually permits you to call a javascript function. Flash can be listening to this function with a callback.

I found both of these methods with their drawbacks in their own ways.

Solution 1 has potential scope issues, that the child Flash movie would have to know exactly the path to call the function, and could easily be problematic once we start incorporating preloaders.

Solution 2 (Captivate->HTML[Javascript]->Flash communication). Although a neat solution, I always try to avoid this sort of thing if possible just to avoid the possibility of browser / cross-platform issues, etc.

I was looking at other possibilities within Captivate and discovered that one Flash-esque thing that Captivate can do, is set a variable. I realized that quite a simple and neat solution was possible:

After loading the Captivate file, the parent Flash file can be constantly checking if the Captivate file has set the variable (on enter frame) and when it has, trigger an action.

This is easily accessed. I had a variable called ‘completed’, and I checked it via:


iOS development with Swift - book: video course:

Tagged with:
Posted in Flash

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: