?
Solved

changing the speed of an mp3

Posted on 2004-03-23
8
Medium Priority
?
164 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 1460 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

765 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