Solved

changing the speed of an mp3

Posted on 2004-03-23
8
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

733 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