Ever needed to have a “Replay?” or some other dialog box appear when a Captivate movie ends?

A reader of my blog, Sean Bezdicek, emailed me a while back with the following:
Hello Mark
Your blog saved my sanity. A few months back you blogged about inherent variables inside a Captivate .swf.My goal was to have a replay window appear when the captivate movie finished.
On the root level I used the following Actionscript (2.0–mx2004).
//This files loads into the loader component
myLoader.contentPath = “TestCP.swf”;
//
if (myLoader.content.rdinfoCurrentFrame > 1 && myLoader.content.rdinfoCurrentFrame == myLoader.content.rdinfoFrameCount) {
pause_btn._visible=false
resume_btn._visible=false
rewind_btn._visible=false
replay._visible=true
}
I would like to experiment and load the skin into the flash file for the use of captivates controls and still access the same variable.
Using my file above as an example, do you know what the loader instance name would be for the TestCP_skin.swf that loads the TestCP.swf?
So, I am looking for:
myLoader.TestCP_skinInstance.content.rdinfoCurrentFrame
For your help, I donate my .fla to you so that you can pass it along on your blog. It may be of help for anybody else who experienced the same level of frustration. It has a play/pause button along with a rewind.
Thank you for your help.
Sean Bezdicek
My response to Sean:
Hi Sean,
Glad I could be of help! I don’t have time to look at your files until tonight as I’m in meetings all day, however if I read correctly what you’re asking then the instance name of the skin is:
myFlashContainer.cpSkinLoader
So in the above, it is cpSkinLoader_mc that is what you’re looking for I believe.
Try it and let me know. If I recall correctly (it’s been a while since I’ve used the AS2.0 loader) but I believe the code would be:
myLoader.content.cpSkinLoader
Let me know if this helps.
Take care,
mark
Sean’s final response:
That’s it!!!
Thanks a alot.
Attached is my sample file with the working document. Again, make it available to all via your blog. Use the same cp file from before.
I will be a regular reader.
Sean
Thanks Sean for giving back! I get questions every week about Captivate to Flash communication yet you’re the first to donate back some code. Everyone who has run into this issue will appreciate your efforts.
One Comment
Hey Mark…My name is Mark as well and I am managing a Captivate Users Group in Seattle. I just discovered your blog and love it. You have a lot of knowledge and experience in the area of Captivate, specifically with embedding actionscript. Would you be interested in (virtually) presenting at a future meeting? We are always looking for interesting topics and presenters.