2 Replies Latest reply on Oct 13, 2012 3:33 AM by AmintaAdobe

    Use of Edge Composition in iBooks Author, a question

    AmintaAdobe Level 1

      Hi folks!

       

      I'm using with great pleasure Adobe Edge Animate 1.0 to make Html Widgets for Apple iBooks Author!

       

      In a composition, I've defined this variable:

       

       

      var  track1 = new Audio();

              track1.src = "media/track1.m4a";

              track1.volume = 0.5;

       

       

      and made it play:

       

      track1.play();

       

       

      All it works but...what if I want that - when I go out from the widget on iBooks on iPad - the track pauses?

       

       

      I've coded this in my index.html file inside the widget:

       

       

          <script type="text/javascript">

         widget.pauseAudioVisual = function() {

        

          // do this when closing Widget

      $.Edge.getComposition(EDGE-114545384).getStage();

          track1.pause();

       

       

      }

       

       

        widget.didEnterWidgetMode = function() {

          // do this when entering widget

       

      $.Edge.getComposition(EDGE-114545384).getStage();

          track1.pause();

      }

       

        </script>

       

       

      ... but when I go out form widget the track still plays on....

       

       

      Any hint?

       

      Many thanks in advance!

       

      Davide