I tried out the code and it looked really neat. :))
I am but a beginner in Action Script, but I have worked a lot with VB and similar code, so I pretty much understand what this code is doing.
However, I do not get what you are trying to do. In what way do you mean create another sprite on top of the present?
If you are trying to create it directly on top of the other, one is blocking the other, which is the reason you do not see it.
I messed around with the code a bit and got this:
var url:String = "09 Hotel California.mp3";
var request:URLRequest = new URLRequest(url);
var s:Sound = new Sound();
s.addEventListener(Event.COMPLETE, completeHandler);
s.load(request);
var song:SoundChannel = s.play();
song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
var ba:ByteArray = new ByteArray();
var gr1:Sprite = new Sprite();
gr1.x = 0;
gr1.y = 400;
var blur:BlurFilter = new BlurFilter(10,20, BitmapFilterQuality.HIGH);
gr1.filters = [blur];
addChild(gr1);
var gr2:Sprite = new Sprite();
gr2.x = 0;
gr2.y = 400;
addChild(gr2);
var time:Timer = new Timer(50);
time.addEventListener(TimerEvent.TIMER, timerHandler);
time.start();
function completeHandler(event:Event):void {
event.target.play();
}
function soundCompleteHandler(event:Event):void {
time.stop();
}
function timerHandler(event:TimerEvent):void {
SoundMixer.computeSpectrum(ba,false);
var i:int;
gr1.graphics.clear();
gr2.graphics.clear();
var mat:Matrix = new Matrix();
mat.rotate(1.57079633);
gr1.graphics.beginGradientFill(GradientType.LINEAR, [0xFF0000, 0x0A7614], [1, 1], [10, 170], mat);
gr2.graphics.beginGradientFill(GradientType.LINEAR, [0xFF0000, 0x0A7614], [1, 1], [10, 170], mat);
gr1.graphics.moveTo(0,0);
gr2.graphics.moveTo(0,0);
var w:int = 1;
for (i=0; i<512; i+=w) {
var t:Number = ba.readFloat();
var n:Number = (t * 500);
gr1.graphics.drawRect(i, 0, w, -n);
gr2.graphics.drawRect(i, 0, w, -n);
}
}
It turned out neat, because the blur applied to gr1 shows up behind the hard lines of gr2, so there is like a shadow or a blur outside of the outline.
Also, if you move up the effect a little more (like saying gr.y = 200; instead) you can see that there is really a top and a bottom to this wave, the wave is just moved down so you only see the top part.
Does this give you an idea of what to do? If not, please explain the question more, and I will be happy to help in any way I can.