PDA

View Full Version : Flash Sound Wave



Halting
30-08-2006, 10:11 PM
Hey,

Is it possible to embed a SHOUTcast stream into a flash file and display a live sound wave animation. I have no knowledge whatsoever of Macromedia Flash. If you know how to do it could you possible create an example with the sound wave being a 2px solid black line.

Thanks,

TAO

[Oli]
30-08-2006, 10:24 PM
i started somthing but never finished it.
(note somthing wen wrong with the fonts :p EDIT: or not, dunno, font in nav should be visitor)

www.tetn.warhead.be/jumpcore/somthing/

do u mean the sound thing in upper right corner ?

nets
30-08-2006, 10:30 PM
I think it's possible to stream music in Flash; however I think it's unlikely that you'll be able to interact with the stream, and if you can, I'm assuming it would be extremely hard unless there's some functions to help you along (again, I think that's unlikely).



;2141205']i started somthing but never finished it.
(note somthing wen wrong with the fonts :p EDIT: or not, dunno, font in nav should be visitor)

www.tetn.warhead.be/jumpcore/somthing/

do u mean the sound thing in upper right corner ?
That's just an animation?

[Oli]
30-08-2006, 10:32 PM
I think it's possible to stream music in Flash; however I think it's unlikely that you'll be able to interact with the stream, and if you can, I'm assuming it would be extremely hard unless there's some functions to help you along (again, I think that's unlikely).



That's just an animation?

Yeh, but, im asking if that is what he wants, as i dont get wot hes looking for.

Halting
30-08-2006, 10:45 PM
That's exactly what I am looking for. Apart from one horizantal wave instead of a few vertical lines to create the wave. Like inside Windows Media Player effects.

Kymux
31-08-2006, 10:59 AM
Flash 9 will have the capability to work with SHOUTcast sound waves but the AS code in Flash 9 is not powerful enough to deal with such a fast running program. If you have no use with flash then I suggest you read some basic animation tutorials before delving into advanced actionscript. xd

Halting
31-08-2006, 11:10 AM
How about a Sound Wave which isn't developed around the sound embeded into the flash. What about one that is just random, but can make my website look unique?

Per
31-08-2006, 12:04 PM
Most of the ones you see on sites are just random looking ones, but they go fast enough it actually looks like its moving with the song, and then they just animate it to a flat bar when you turn the music off ^^

Kymux
31-08-2006, 03:20 PM
Oh no that's possible. I know that embedding SHOUTcast radios isn't very easy to do but to work with sound is good. Go to Kirupa.com and search ound in the search bar at the top. That's GREAT !

nets
31-08-2006, 10:45 PM
Coded one in JavaScript (using no images), although I wouldn't suggest using this as I haven't tested it properly and it makes the browser really slow.
Example: http://joshjh.pwp.blueyonder.co.uk/wave/


var waveStructure = new Array(), amplitudeDirection = 'u', rand, adj, nextWave;
function structureWave() {
rand = Number(Math.floor(Math.random()*100))+1;
if(rand<21 && amplitudeDirection == 'u') amplitudeDirection = 'd';
if(rand<21 && amplitudeDirection == 'd') amplitudeDirection = 'u';
adj = Number(Math.floor(Math.random()*15))+1
if(waveStructure[0]==undefined) waveStructure[0] = 10;
var previousWave = waveStructure[0];
for(a=0; a<adj; a++) {
if(amplitudeDirection == 'u' && waveStructure[0] == 30) amplitudeDirection = 'd';
if(amplitudeDirection == 'd' && waveStructure[0] == 0) amplitudeDirection = 'u';
if(amplitudeDirection == 'd') nextWave = Number(previousWave)-1;
if(amplitudeDirection == 'u') nextWave = Number(previousWave)+1;
waveStructure.splice(0,0,nextWave)
if(waveStructure[150]!=undefined) {
waveStructure.splice(200,1);
}
}
}
function printWave() {
var HTML = '';
for(b=0; b<waveStructure.length; b++) {
//HTML += '<img src="pixel.gif" style="margin-bottom: '+waveStructure[b]+'" />';

HTML += '<div style="width: 1px; float: left; height: 0; padding-top: '+waveStructure[b]+'"><hr width="1" align="left" noshade="true" color="#000000" /></div>';
}
document.getElementById('waveBox').innerHTML = HTML;
structureWave();
}

Halting
31-08-2006, 11:05 PM
Thank you joshua, but it's extremely lagged and somehow I don't think my listeners would believe that's a live wave.

nets
31-08-2006, 11:18 PM
It would probably be easier to just have an animation.

Want to hide these adverts? Register an account for free!