Comunidad de diseño web y desarrollo en internet online

ecualizador grafico ayuda

Citar            
MensajeEscrito el 08 Dic 2008 12:35 am
bueno aqui vengo nuevamente con una peque;a duda... tengo el siguiente codigo para un ecualizador grafico... como podria convertirlo en un simple ecualiador de barras y no como esta ahora en circulos... gracias de antemano

var s:Sound = new Sound();
var sc:SoundChannel;
var ba:ByteArray = new ByteArray();
var array:Array;

s.load(new URLRequest("sound.mp3"));
sc = s.play(0,1000);

this.addEventListener(Event.ENTER_FRAME, spectrum);

var a:Number = 0;

function spectrum(event:Event)
{
a = 0;
graphics.clear();
SoundMixer.computeSpectrum(ba,true,0);
for(var i=0; i < 256; i=i+Cool
{
a = ba.readFloat();
var num:Number = a*360;
graphics.lineStyle(num/15,0x0066FF|(num << Cool);
graphics.drawCircle(stage.stageWidth/2,stage.stageHeight/2,i);
}

}

Por crackr7

15 de clabLevel



 

firefox
Citar            
MensajeEscrito el 08 Dic 2008 02:54 pm
Hola

Al ejecutar tu código me sale n errores
Ejm
Cool ??
ba esta vacio ???

Si solo es lo del réctangulo aqui debes cambiar
graphics.drawCircle(stage.stageWidth/2,stage.stageHeight/2,i);
por
this.graphics.drawRect(0, 0, this.width, this.height);

Por emedinaa

196 de clabLevel

2 tutoriales

Genero:Masculino  

Lima Perú

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.