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:
- 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…
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.
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: