;

PDA

Click to See Complete Forum and Search --> : Could somebody give me a example of SpectrumAnalyzer component in KM7


songxp03
05-05-2009, 10:01 AM
This day,I want made a flash using SpectrumAnalyzer in KM7.But the code doesn/t work well.:scared:
The code is as below:

var spt:SpectrumAnalyzer=new SpectrumAnalyzer();
var d:Array=new Array(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9);
var i:Number=1;
var timer:Timer=new Timer(200,4);
timer.addEventListener(TimerEvent.TIMER,TT);
spt.setmode(0);
spt.data=d;
spt.moveTo(50,50);
spt.data=functionData;
addChild(spt);
function TT():void{
i+=1;
if(i>=9)
i=1;
d.splice(2,0,i/10);
}
function functionData():void {
i+=2;
if(i>=9)
i=1;
d.splice(2,0,i/10);
}
functionData();
-----------------
I'm pool in Action Script . Could somebody give me an example about SpectrumAnalyzer,thanks a lot!:)

Chris_Seahorn
05-05-2009, 11:31 AM
Spectrum components are drop ins with KM7 now. Drop one on the stage from the GUI and it works, no scripting is needed to create it like it was in beta (unless you simply prefer to script one for whatever reason). If you do, the class and it's methods are exposed in your Koolmoves/Bin/AS3/Classes/km/components subdirectory.

songxp03
05-07-2009, 01:26 AM
I made it.:lovers: