0 Replies Latest reply on Jan 9, 2013 2:24 AM by Aiesyaah

    Sound in Adobe Edge

    Aiesyaah

      Hi,

       

      I have managed to make the sounds play and stop, but now I need to ensure that

      1) only 1 sound is played at only 1 time when run in Adobe Edge

      2) Once the sound is stopped mid-way, the sound will automatically go to the beginning of the sound clip.

       

      Here is the set of my codes in index.html.

       

      <!DOCTYPE html>

      <html>

      <head>

                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

                <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

                <title>Untitled</title>

       

      <!--Adobe Edge Runtime-->

          <script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>

          <style>

              .edgeLoad-EDGE-17588951 { visibility:hidden; }

          </style>

      <!--Adobe Edge Runtime End-->

       

       

      <!--insert the audio functions here-->

      <script>

       

       

       

      <!--sound set 1-->

      function VO() {

        var myAudio = document.getElementById("VO");

          myAudio.play();

      }

      function VO1() {

        var myAudio = document.getElementById("VO");

          myAudio.pause();

      }

       

       

      <!--sound set 2-->

      function VO2() {

        var myAudio2 = document.getElementById("VO2");

          myAudio2.play();

      }

      function VO3() {

        var myAudio2 = document.getElementById("VO2");

          myAudio2.pause();

      }

       

       

       

      </script>

       

       

      </head>

      <body style="margin:0;padding:0;">

                <div id="Stage" class="EDGE-17588951">

                </div>

       

      <!--insert the audio id here. audio id="VO" is because the function is VO() -->

      <audio id="VO">

      <source src="sounds/sound01.mp3" type="audio/mpeg" />

      </audio>

       

       

      <audio id="VO2">

      <source src="sounds/sound02.mp3" type="audio/mpeg" />

      </audio>

      </body>

      </html>

       

      Here is a link to my file: https://www.box.com/s/khnjuk7j9zus7pw03u6f

       

      Thank you.