View Full Version : extract audio clips from a song?
zrosen88
02-09-2008, 04:19 AM
hey all --
im brand new, so any help would be GREATLY appreciated!
i was wondering if there was a way to extract a certain part of a song via flash/as. for example, if you had a 3:00 song and wanted the visitor to your site to be able to select any 0:30second fragment, how would you go about this?
thanks!
eNine
02-09-2008, 02:06 PM
it's easy to begin the sound at an arbitrary starting time by using the following
mySound.play(30); //30 is the starting point
to stop the sound after 30 seconds played you cold either mess around with soundChannels which have a position and length properties, or you could create a timer and then listen for a Timer.EVENT_COMPLETE--just make the timer run for 30 seconds
thirtySecTimer.addEventListener(TimerEvent.TIMER_C OMPLETE,stopPlaying).
the stopPlaying() method could then stop the sound.
zrosen88
02-09-2008, 04:43 PM
thanks SO much for your reply!!
wouldn't that just PLAY 30 seconds of the song, however, instead of having it play the whole thing and being able to SELECT 30 seconds?
Bombdogs
02-09-2008, 05:31 PM
You need to explain explicitly what you mean by SELECT?
Is it to display a selection of the waveform, like an audio editor?
PMF
zrosen88
02-09-2008, 05:41 PM
hey,
sorry for the lack of clarification!
yup, basically like an audio editor. i'm working on a site where I want somebody to be able to upload a song, extract ~30 seconds from it, then have that 30 seconds saved to the server.
zack
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.