I received an email from a fellow Captivate Developer asking if it was possible to have a Main Cp swf control another “demo” swf inserted as an animation. Specifically she wanted the “demo” swf to send a message to the Main swf to move on to the next slide. YES… THIS IS POSSIBLE!!! pizza pizza!
How? Through JavaScript awesomeness (of course!). Where’s the BEEF?!?!
Simply place a button on the demo slide and set it to execute this JavaScript:
function nextSlide(){
var objCP = document.Captivate;
objCP.cpEISetValue(‘rdcmndNextSlide’, 1);
}
nextSlide();
OR you can have this done automatically by placing the JS code on a slide entry or exit action. It’s up to you.
Try the
*** Live Demo ***
Why does this work? document.Captivate resolves to the MAIN swf so you can control it using rdcmndNextSlide.or any movie control variable. You could even pass user variables to the Mains swf this way. That should get your wheels turnin’
Download Sourcepizza pizza!
