Solved

changing the speed of an mp3

Posted on 2004-03-23
8
159 Views
Last Modified: 2010-04-03
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?
0
Comment
Question by:andylaw78
  • 3
  • 2
8 Comments
 
LVL 22

Accepted Solution

by:
rascalpants earned 365 total points
ID: 10657770
the reason this is not possible is do to the fact that a sound is played independent of the timeline...  so trying to use Actionscript to slow down the timeline would not work....

and there is no way to use Actionscript by itself to do this either....


there might be other suggestions that I can give i you explain in more detail about what you are trying to do...


rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10657779
here is a page that is helpful in the creation of an mp3 controller:

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

rp
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10706204
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
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10824634
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
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10825672
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
0
 
LVL 1

Author Comment

by:andylaw78
ID: 10827049
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
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now