Just a quick tip as this comes up from time to time via emails to me - How do I control Captivate swf’s that are loaded into the Captivate-generated “skin.swf”?
Adobe has overhauled their documentation for Captivate (I’m guessing with the release of version 3, which was announced today) and in the livedocs for Captivate is a page listing the rdcmnd variables mentioned in a previous post of mine. There is a note in there that is useful to know:
“To control the project through the skin file, add the prefix cpSkinLoader_mc to the variables. ”
Typically I create my own navigation “skin” for my Captivate projects but this is useful to know. Prior to Captivate v2.0 the navigation bars that were included were absolutely hideous - they were mostly unprofessional looking and were the type of thing you’d expect from one of those “Build yur own kewl mp3 playa!” tutorials on Flashkit. But with v2.0 they added the “skin” swf as a container by default and there are some nice options. Particularly once you know how to get rid of or edit the Adobe branded ‘info’ button and/or caption.
8 Comments
Hello Mark and others,
One more question in terms of communicating from a flash wrapper to a captivate swf (3.0). I have got the “code swf” concept working. but not without some confusion. It seems that I am only able to refer to the captivate swf (cpSkinLoader_mc. ect) from within an on(press) or on(release) etc function. the code swf passes my variable to the main timeline ok. In my case I have buttons in the Captivate swf, that can take one back to the beginning, and rerun the tutorial. No I guess when the button in Captivate is clicked, and the tutorial does in fact, restart, it bypasses the code swf that is on that slide, so whatever my data was for the previous code swf, stays the same. I guess I am looking for that button click to pass a value back to the flash wrapper. I guess I need to do something else here. I am not explaining this very well, sorry for that.
I will take a look at the example on the blog where some one has placed a code swf that allows returning to the start.
I appologize for this confusing post, I am confused my self!
eholz1
I’m not totally following you here. You mention buttons in the Captivate - are they flash swf buttons that were imported in?
I am trying to get captivate files to pause.
captivate files are made in cs3. we are controlling them from a flash wrapper (set to as2.0 so it will work with captivate)
the captivate files have a skin file. so far following the instructions I can get the captivate file to pause, as long as I use a button in the flash wrapper.
however, as we already have a controller in the captivate skin, which we want to keep so that we can rewind, there isn’t really any point having a button in the flash wrapper.
however, can’t just set the wrapper to pause the capitavte swf unless the pause is in something e.g. a button. I presume this is beacuse without a button you may be trying to pause before the loader has actually finished loading.
so…is there a way to get the flash piece to pause the captivate piece as soon as it loads without a button. I notice the loader has a .complete parameter but I suppose what i’m looking for is something more like onLoad()
otherwise I suppose we may ahve to move all the control into flash but would prefer not to do this.
cheers
joss
Since you do not have a contact section I will hope you get this. I am working on a project that uses its own “navigation “skin”” like you said you use but I am having a problem with mine. For some reason in IE7 things work fine with a clear cache but as soon as the page is refreshed the captivate swf no longer displays. The weird part is that It is loading, it just remains invisible. I’ve tried setting _visible to true and _alpha to 100 but that all doesn’t work. I’m just curious if there is maybe a function I must call inside the captivate movieclip. If you have run into anything similar or have any ideas it would be appreciated.
Brent,
Email me some more details and I’ll try to help. I’ve not run into the problem you describe before so my guess is it is something environmental. Can you zip up and email me (or better yet if its large then put on a server and let me download it) so I can take a look.
mark
Not to add more issues, but I have a Flash movie that loads a series of Captivates into a movieclip. A new captivate is loaded everytime you click Next. For some reason, the Captivate text-entry only works for the first Captivate loaded. It doesn’t work on Captivates swfs loaded after the first captivate is loaded. Anyone have any ideas? My head is killing me?
Seth,
I did a quick test and it’s working fine for me. Check out my example here:
http://elearninglive.com/temp/twoTextFieldCPTemp/Untitled-1.swf
If you go to this directory you can get my .fla (sorry, I forgot to save the .cp files but I did nothing unusual to them other than add a text field):
http://elearninglive.com/temp/twoTextFieldCPTemp/
mark
Help,
Hello there. I am attempting to access a Captivate 3 swf via a Flash wrapper.
I have tried creating this in the Flash 8 environment and the Flash CS3 file format, but using ActionScript 2.0 (in CS3 pro). I am using a Loader component for the Captivate swf. I know I must be missing something, but so far I am unable to access any of the Captivate variables, like rdinfoCurrentSlide, rdinfoFrameCount, etc. Here is the code am attempting to run. The Captivate swf is published to Flash Player 8.
I am using a skin, but I have tried using a non-skin swf, with no results.
The code that is commented out does not work as well.
Code:
/* add to stage text field to show lesson number
- capture lesson number from Captivate Tutorial
*/
var strLesson:String;
var myRoot_mc:MovieClip = this;
//load the cp swf into the loader component
myRoot_mc.createClassObject(mx.controls.Loader, “myLoader_ldr”,this.getNextHighestDepth());
myRoot_mc.myLoader_ldr.scaleContent = false;
myRoot_mc.myLoader_ldr._xscale = 80;
myRoot_mc.myLoader_ldr._yscale = 80;
myRoot_mc.myLoader_ldr.contentPath = “LessonOne_skin.swf”;//”EditingDocumentsFinal.swf”;
//if(_root.container.myLoader_ldr.content.cpSkinLoader_mc.rdinfoCurrentSlide == 0)
//{
// strLesson = “Lesson 1″;
//}
//if(_root.container.myLoader_ldr.content.cpSkinLoader_mc.rdinfoCurrentSlide == 5)
//{
// strLesson = “Lesson 2″;
//}
// }
strLesson = “Tutorial Introduction”;
//strLesson = myRoot.container.myLoader_ldr.content.cpSkinLoader_mc.rdinfoCurrentSlide + ” Number of slides: ” +
// myRoot.container.myLoader_ldr.content.cpSkinLoader_mc.rdinfoFrameCount;
myRoot_mc.txtSlide.text = strLesson;
myRoot_mc.sample_text.text = “Slide Count”;
btn_pause.onRelease = function(){
sample_text.text = myRoot_mc.myLoader_ldr.cpSkinLoader_mc.rdinfoFrameCount;
myRoot_mc.myLoader_ldr.cpSkinLoader_mc.rdcmndPause = 1;
}
// dynamic text component on stage
txtSlide.text = strLesson;