0
votes

I'm using Flash to call in a Captivate 5.5 file and control everything through Flash. I can control just about everything in Captivate just fine, but the only thing I need to figure out is how to tell if the current slide is on the last frame.

In Flash I have a "Next" button that will advance the Captivate project when clicked, but I want to hide the button until the Captivate slide is complete. I can use MovieClip(_swfLoader.content).rdinfoCurrentFrame just fine and it works perfect, but MovieClip(_swfLoader.content).rdinfoFrameCount gets the frames for the whole project and not just the slide the user is currently on.

I thought maybe I could access Captivates slide duration in seconds, but that is a no-go as well :( I cannot believe Adobe did not create a variable that will give developers access to any type of slide duration or slide completion.

One thought I have is to create some type of loop that would loop the current frame count and when the frames match, then the end of the slide has happened and make the "Next" button visible. But, I'm thinking the loop happens faster than the frame progression, so any type of frame count will match the current frame.

Another idea I had is check if the current pause state of Captivate is true (meaning Captivate is paused). In each Captivate slide I have a pause at the end of every slide to prevent automatic slide progression, but I couldn't find a way to check the pause status.

Has anyone ever ran into this issue? How did you over come this?

Here's a couple links to Captivate AS3 variables:

CPGURU

PIPEWERKS

Thanks!

2

2 Answers

1
votes

You could read those values and compare (found on CPGURU):

rdinfoFrameCount and rdinfoCurrentFrame

I haven't checked this though,

re the pause isn't it the rdcmndPause or rdcmndPaused property that pauses the slide?

0
votes

I decompiled a Captivate SWF using SoThink and studied the XML script generated using trace( [importedSwfRef].movieXML ) after importing the Captivate swf into my main AS3 Flash Movie.

  • Each of the slides are in a movieclip
  • You can see that the number of frames (XML Attr) of each slide corresponds to each movieclip
  • Each movieclip is in its own layer
  • Each clip is named 'SlideX_mc' Remember that slide number start at ZERO.
  • It would seem that all slides are 'switched off' and the current Slide is 'switched on'

Physically adding a widget at the end of each slide is the 'hammer-head' approach. You wouldn't want to do it 100 times and it also requires a certain level of expertise on the side of your client to on-develop any content. Ideally you want a script that sniffs out and adds a stop() to each slide clip on the fly before commencing using addFrameScript()

JUST HAD A THOUGHT - Maybe you can add stop() to the end of each slide clip? You know the number of Slides so you could Loop through Slide0_mc to SlideX_mc querying the number of frames and then adding a Callback function to Stop(); the play head - Maybe?