7 Replies Latest reply on Nov 29, 2011 4:00 PM by TomJudd63

    control captivate 5 swf files with As3 in flash cs5

    hanna@85

      I have a custom build swf player, which has basic functions of play, pause, quit etc. It plays swf created with flash. I created a demo using captivate cs5, then exported it to flash. The captivate swf does not works with my swf player, it loads and starts playing but play and pause button does not work at all with it.

      I am not sure how to do it. Please provide some solution. Thanks

       

      Also i am getting following error :

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at captivate.veela_as3::rdScriptEval/Load()
      at captivate.veela_as3::CaptivateMainTimeline/endMovieFunction()
      at captivate.veela_as3::rdMovie/movieonEnterFrame()
      at captivate.veela_as3::CaptivateMainTimeline/onenterframe()

       

      Message was edited by: hanna@85

        • 1. Re: control captivate 5 swf files with As3 in flash cs5
          kglad Adobe Community Professional & MVP

          when i've inherited a project that uses a captivate file i've had to deconstuct the captivate file and make it in flash.  ie, controlling a captivate file with flash is a mess.

          • 2. Re: control captivate 5 swf files with As3 in flash cs5
            hanna@85 Level 1

            Really, is'nt there any other way to do that..deconstructing every file..:(

            Is it possible that for the particular slide with the captivate swf I create a seperate button to pause and play,

            if it is possible can you please direct me to some example or code.

            • 3. Re: control captivate 5 swf files with As3 in flash cs5
              kglad Adobe Community Professional & MVP

              i know of no way to easily control a captivate swf using flash.

              • 4. Re: control captivate 5 swf files with As3 in flash cs5
                hanna@85 Level 1

                So, I finally figured out how to do it. And here is the code for anyone who is trying to do the same.

                First thing first when you are exporting captivate file to flash it creates a "com" folder, you will need that folder to access the rdSoundHandler.

                And then simply use the following code to play/pause the swf. This code will not work for swf file created in flash.

                This is the answer to problem I found, if anyone find a better way then please keep posted.

                 

                 

                import flash.net.URLRequest;
                import flash.display.Loader;
                import com.adobe.captivate.flash.rdSoundHandler;

                var ldr:Loader=new Loader();
                addChild(ldr);
                ldr.load(new URLRequest("externalCaptivate.swf"));


                playp.addEventListener(MouseEvent.CLICK,playF);
                pausep.addEventListener(MouseEvent.CLICK,pauseF);


                function playF(e:Event){
                MovieClip(ldr.content).rdcmndResume = 1;
                }

                function pauseF(e:Event){
                MovieClip(ldr.content).rdcmndPause = 1;
                }

                • 5. Re: control captivate 5 swf files with As3 in flash cs5
                  evergreensab

                  I don't know how to get all these messages to stop being sent to me regarding, adobe flash player and those related.? But they are taking up my entire spam and message centers and has been for years that I can't even check my good emails from my friends.?? I usually have over a thousand in my spam, all the same and in my new mail over a thousand.? I want off this list!? Can anyone out there help get me off, please.? If so, let me know if you can do it or I have to stop it.? And if so how do I do that.? Sorry, I'm not to swift when It comes to computers.? Here me screeming from the top of my voice, (take my name off please_) over and over again, before I have a nearvouse breakdown.? God Bless you and you whoever can get me off of this list of adobe/flash and whatever.? thank you very much.?

                   

                   

                  Susan

                  • 6. Re: control captivate 5 swf files with As3 in flash cs5
                    kglad Adobe Community Professional & MVP

                    while reading this message, at the top right of the thread (adjacent to your original post), there's a link:  "stop email notifications".  click it.

                    • 7. Re: control captivate 5 swf files with As3 in flash cs5
                      TomJudd63

                      I've had some success re-creating the player controls for Captivate movies and it's more or less what you have done here. 

                       

                      I'm not sure why you've imported the rdSoundHandler class.  It doesn't appear to be referenced elsewhere in your code.

                       

                      Can you explain this? Is there some part of your code that isn't displayed here?