-
Since you are so kind to share your source Bret, I'll also share the source of the visualization I did. It doesn't add buttons to the skin like you did but only adds a visualization. It's a modified load.as file for the OffWhite skin.
Code:
width = limit(width,173,1024);
height = limit(height,240,768);
hslider = new flash.display.BitmapData(width-52,1,false,0xa0a090);
cdrag = new flash.display.BitmapData(width-66,17,true,0);
tdrag = new flash.display.BitmapData(16,16,true,0);
setUnderlayImage(0,0,'underlay',width,height,new flash.geom.Rectangle(10,200,40,30));
setDisplay(6,23,width-46,height-33,0xf7f9f0);
setInfoScroll(0,'_sans',11,0xa0a090,true,1,9,6,width-75,14);
setFD(12,height-14,8,30,2,0xa0a090);
setTimelineSlider(9,height-7,'',0,0,1,hslider,0,0,width-52,tdrag);
setVolumeSlider(width-22,133,'',0,0,0,'volume_fill',1,0,-38,'drag');
setPauseButton(width-32,20,'pause_up','pause_down','pause_over');
setPlayButton(width-32,20,'play_up','play_down','play_over');
setStopButton(width-28,48,'stop_up','stop_down','stop_over');
setNextButton(width-28,74,'next_up','next_down','next_over');
setPrevButton(width-28,99,'prev_up','prev_down','prev_over');
setDragButton(6,5,cdrag);
underlay.filters = [f_shw];
// ** here starts the visualization code **
// rainbow color arrays for 9 and 12 band fd
c9 = [0x630000, 0xbd0000, 0xff0000, 0xff0000, 0xffb500, 0xbdff00, 0x18ff00, 0xa5ff, 0x5a00ff, 0x6b006b];
c12 = [0x630000, 0xa50000, 0xe70000, 0xff0000, 0xff0000, 0xff8c00, 0xffff00, 0x9cff00, 0x18ff00, 0xd6ff, 0x31ff, 0x7b00e7, 0x6b006b];
// create a non visible movieclip to draw on
createEmptyMovieClip('rbow', 99);
rbow._visible = false;
// create a bitmap with the same size as the display object and attach it
rbow_bd = new flash.display.BitmapData(videoholder.w, videoholder.h, true, 0);
videoholder.attachBitmap(rbow_bd, 2);
// init the required matrices and rectangle
matrix = new flash.geom.Matrix();
matrix.createGradientBox(4, rbow_bd.height, -Math.PI / 2);
matrix2 = new flash.geom.Matrix(1, 0, 0, 1, rbow_bd.width - 4, 0);
rect = new flash.geom.Rectangle(rbow_bd.width-2, 0, 2, rbow_bd.height);
// add a glow to the normal fd bars
fdsp.filters = [new flash.filters.GlowFilter(0xf7f9f0, 1, 16, 16)];
// process the frequency data
_onFD = function(a){
if (a.length){
rbow_bd.scroll(-1, 0);
rbow_bd.fillRect(rect, 0);
alphas = [0];
ratios = [0];
i = 0;
while (i < a.length){
i++;
alphas[i] = a[i] * 4;
ratios[i] = 255 * i / a.length;
}
rbow.clear();
rbow.beginGradientFill('linear', this['c'+a.length], alphas, ratios, matrix);
rbow.moveTo(0, 0);
rbow.lineTo(0, rbow_bd.width);
rbow.lineTo(4, rbow_bd.width);
rbow.lineTo(4, 0);
rbow.endFill();
rbow_bd.draw(rbow, matrix2);
} else {
rbow_bd.fillRect(rbow_bd.rectangle, 0);
}
}
-
Thanks very much guys, I'll work on your examples and see if I cant repay with some work of my own.