9 Replies Latest reply on Jan 14, 2014 10:06 AM by TLCMediaDesign

    Preloading a published captivate recording to flash AS2




      I have a video recording made in adobe captivate 4 and disabled the preloader on the publish preferences. The reason why I disabled this is because other people cannot see the preloader while the captivate movie is loading but the preloader displays when I view it online usign my computer (Do you have any idea on how I can fix this?). As an alternative/workaround I created a movieclip loader class and load the external captivate movie in flash. The preloader that I created works. However, the captivate movie plays at once even if the movieclip loader hasn't reached 100%. How can I prevent the captivate movie to play while the preloader isn't 100%? I also get an error on flash while simulating download in flash. The error says:


      deepak branching : scripteval:[object Object];


      When I get that error, that is the time that the captivate movie plays. Below is my code in flash it is in AS2.


      var linking:MovieClip = _root;
      var level2 = linking.attachMovie("captivateHolder", "captivateHolder", this.getNextHighestDepth());


      var loader:MovieClipLoader = new MovieClipLoader();
      loader.loadClip("captivate/prequalified_contractors.swf", level2.captivateMovie);

      var preload:Object = new Object();

      preload.onLoadStart = function(target){
        trace("Started Loading");

      preload.onLoadProgress = function (target, loadedBytes, totalBytes){
        level2.captivatePreloader.text = Math.floor((loadedBytes/totalBytes)*100)+"%";
        level2.captivateMovie.rdcmndNextSlide = 0;

      preload.onLoadComplete = function(target){

        level2.captivatePreloader.text = " ";
        level2.captivateMovie.rdcmndNextSlide = 1;


      I tried to restrict the captivate movie from playing by putting rdcmndNextSlide = 0;

      My question is, how can I restrict the captivate movie from playing while the event is still on the onLoadProgress and make it play once the preloader reaches 100%.


      This is the first time that I used adobe captivate 4.


      Thank you.




        • 2. Re: Preloading a published captivate recording to flash AS2
          www.cpguru.com Level 4

          You could pause the Captivate project when you start to preload it by using the Captivate system variables. Then when your file has been loaded 100% you could resume it again by using a different system variable.


          You can see a list of the various system variables here: http://www.cpguru.com/2009/04/28/system-variables-in-captivate-4-%e2%80%93-a-complete-list /


          The relevant variables for you would be:


          rdcmndPause = 1; (to pause the project)

          rdcmndResume = 1; (to resume playback)


          Naturally you need the instancename (where you load your Captivate movie into) infront of the variable name.


          myLoaderContainer.rdcmndPause = 1;



          • 3. Re: Preloading a published captivate recording to flash AS2
            curlybub Level 1

            Thanks cpguru/Michael. I'll try your suggestion.


            Actually I've tried to use the rdcmndResume, I played with its values on flash 0 and 1. When I used 0 nothing happens. So I think I really need to use the rdcmndPause system variable.


            Thank you.




            • 4. Re: Preloading a published captivate recording to flash AS2
              www.cpguru.com Level 4

              Hi Harry,


              Yeah it's kinda strange with these variables the way they work but you do need to use both of them. The rdcmndPause = 1 will pause the project. Setting it to zero again will not unpause it. Therefore you need the rdcmndResume = 1 to resume playback.



              1 person found this helpful
              • 5. Re: Preloading a published captivate recording to flash AS2
                curlybub Level 1

                Hi Michael/www.cpguru.com,


                I tried your suggestion, and it works. I have another question. How can I detect if the captivate movie is already playing? I cannot use the statment

                if(captivateMovieHolder.rdcmnd.Resume == 1) since that is the default value that captivate uses.


                Any suggestions?


                Thank you.



                • 6. Re: Preloading a published captivate recording to flash AS2
                  curlybub Level 1

                  Another thing. While the loading is still on progress the slider can be used and the user can view the captivate movies contents. I also found on your blog that you can disable scrubbing. I can use that while the movie is loading. But is there a way to make it functional again once the movie has been fully loaded?

                  • 7. Re: Preloading a published captivate recording to flash AS2
                    www.cpguru.com Level 4

                    I don't think there is an easy way to detect if the Captivate movie is playing or not, but I could be wrong. I don't know of any variable that will show it


                    I think you could get around it by using the RdinfoCurrentFrame variable to check for the current frame and then recheck after a small delay and see if the first value is lower than the second value. That would indicate that the Captivate movie is playing.


                    As for re-enabling the scrubber that is not possible. If you use the directions on my blog then that means that you are deleting the event handler for the scrubber and there is no way to reinstate that once it has been deleted.


                    A workaround could be to insert a blank slide of 1 second as your first slide. Then set the variable cpCmndShowPlaybar to 0 on that slide - that can be done directly in Captivate - slide properties. On slide 2 (which is where your actual content is) then reset the variable to 1 and the playbar would show.


                    Hope this helps.



                    • 8. Re: Preloading a published captivate recording to flash AS2
                      curlybub Level 1



                      The manipulation should all be in flash and not on captivate. So that the one that will maintain the video recording section will just record and put directions on the captivate movie and publish it without the preloader.


                      Yes deleting the event cannot be redone. What I did was to turn the progressbar, next and back buttons visibility to false and reshow them once the movie has been loaded completely.




                      • 9. Re: Preloading a published captivate recording to flash AS2
                        TLCMediaDesign Adobe Community Professional

                        I had created a Flash container for software demos. There were demos on several screen that were captured in CP. I ran into so many issues that I eentually exported those to Flash from Captivate. I was using AS3, but I never added the loader to the stage until the load was complete and kept it invisible until the frame where it was needed. Here is my code to get an idea. I'll see if I can find a version when I was still using CP swf files. The problem with those is if the user clicked the back button, it was almost impossible to accurately control the CP movies.


                        if (demo1 != 0)
                        var demo1Request = new URLRequest("demo1.swf");
                        var demo1Loader = new Loader;
                        demo1Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, demo1Loaded);

                        var demo1Content:*;

                        function demo1Loaded(e:Event):void

                        demo1Content = demo1Loader.content;
                        demo1Container.visible = false;