1 Reply Latest reply on Nov 29, 2012 3:50 AM by juanjoharo

    Rewind and forward sound

    juanjoharo

      Hi...

      I'm working in Edge trying to do same things i do in flash (i have not knowledge in css or javascript). One of these thing is create an animation with sound sync and with buttons to jump to some parts of the animation. All is done and works fine, the forward (with time labels) except for the sound.  In flash the sound is in the time lime but no in Edge... i can play or pause but i don't know how to rewind or forward the sound at the same time of the animation to preserve the sync...

       

      Thanks for help

       

       

       

      This is the code i'm working

       

      In the timeline actions

       

      var currenttime=sym.getPosition();

      if(currenttime==-1)

      {

                var esound=new Audio();

                esound.src="sound/audio.ogg";

                var esound1=new Audio();

                esound1.src="sound/audio.mp3";

                this.getSymbol("volplus").stop(0);

                this.getSymbol("volminus").stop(0);

                esound.volume=0.1;

       

       

                 sym.setVariable("audioObj", esound);

                 sym.setVariable("audioObj1", esound1);

       

       

                 $(esound).bind("ended",function()

                 {

                          sym.$('Text').html("Audio Completed..");

                          var playtxt=sym.getSymbol('playbtn').$('btnvalue').html("Play");

                 });

       

       

                $(esound1).bind("ended",function()

                {

                          sym.$('Text').html("Audio Completed..");

                          var playtxt=sym.getSymbol('playbtn').$('btnvalue').html("Play");

                });

       

       

      }

       

       

       

       

       

       

      In the forward button

       

       

      var audioObj = sym.getVariable("audioObj");

      var audioObj1 = sym.getVariable("audioObj1");

       

      //var oAudio1 = document.getElementById('audioObj1');

      //var oAudio = document.getElementById('audioObj');

      audioObj.currentTime += 30.0;

      audioObj1.currentTime += 30.0;