1 Reply Latest reply on Jul 29, 2011 12:10 AM by Lilybiri

    How to insert AS to fix audio in imported swf ?

      Thanks to Whyves... This previous post seems to have a solution, Im just not sure where i create layers in my Captivate 4 file? As I go into Project > Actions >???
      5. Mar 31, 2010 4:23 PM in response to: Whyves_

      Re: Captivate 4, interaction SWF using XML and the Reviewer tool Problem

      Part 1:

      Found a way to stop the imported SWF audio when a user switches slides. The following AS3 code was inserted into the imported swf:


      My actions layer:


      root.addEventListener(Event.ENTER_FRAME, checkSlideInfo);


      My functions layer:


      function checkSlideInfo(e:Event):void {
          /* if user moves to next or previous slide in Captivate, stops the interaction audio */
          if(root.cpInfoCurrentSlide == 4) {
          } else {
              /* stops audio */
              if (savedChannel!=null) {
              /* resets interaction */
              loadContentToBox(contentBox.contentText, instructions);


      So, for those trying to find a way to stop their audio from imported swfs, there's one piece to the puzzle!!! You CAN stop your imported swf audios or animation audios using the above function in AS3!


      BTW, it would be nice if Adobe would create a book on Essentials to Advanced Actions, just a suggestion since it is somewhat of a programming language and it would be nice to have samples and more informative tutorials to use.


      NOTE: The above function calls on other variables and functions are specific to the interaction. The main piece to focus on is the roo.cpInfoCurrentSlide. It had to equal slide 4 in order to allow the interaction swf audio to play. If the user switched, I stopped the savedChannel (named soundChannel variable in AS3) from playing.

        • 1. Re: How to insert AS to fix audio in imported swf ?
          Lilybiri MVP & Adobe Community Professional



          About your suggestion for a book on essentials for advanced actions. Rick Stone has such a book, for Captivate 4 (Goober Guide).  I have been blogging a lot about advanced actions, with links to tutorials published with Adobe Publishing Application. It is not a book, but could perhaps help you if you did not yet visited the blog. The feedback from readers is pretty positive. Here is a link to a post that has a list with the published articles, a lot of other blog posts explain use cases and principles:


          Articles on Advanced Actions