Link to home
Start Free TrialLog in
Avatar of andylaw78
andylaw78

asked on

changing the speed of an mp3

OK, I don't know if this is even possible, but I'm hoping so. I've got a slider in a movie, which I would like to make change the speed of an MP3 playing within the movie. Any ideas of how to go about it, or if it is indeed possible?
ASKER CERTIFIED SOLUTION
Avatar of rascalpants
rascalpants
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
here is a page that is helpful in the creation of an mp3 controller:

http://www.macromedia.com/support/flash/sound/sound_player/

rp
Avatar of krishnaprathab
krishnaprathab

Hi,

There is a way by which you can do this through ActionScript using the setInterval function and calling the nextFrame of the sounds movieclip

stop();

function playfps(delay){
   setInterval(playAndLoop,delay,this);
}

function playAndLoop(mc){
   mc.nextFrame();
   if(mc._currentframe == mc._totalframes){
      clearInterval(playAndLoop);
      mc.gotoAndStop(1);      
   }
}

playfps(1000);

// You will call this function based on the slider value. This will allow you to increase or decrease the speed of the sound.

Note: I take no ownership for this code I have used this sometime back from a site.

Thanks,
KP
Hi,

Did my reply answer your question. If so please close this question or if you need some more help on this feel free to ask.

Thanks,
KP
KP,

I still don't think your code(or any code) can increase the speed of an MP3 that is being played in a SWF...

can you post an example of this...  it does not seem possible...


rp
Avatar of andylaw78

ASKER

sorry, seemed that the code might speed up/slow down the clip, but with a jumpy sound effect. i have decided to stream the mp3s, so have given up on the idea of changing speed. however, if anyone from macromedia happens to read this, it is definately a feature i'd personally like to see in future versions of flash.
thanks for your help anyway guys