Dear all,
I am trying to record speech using a microphone (stand alone) and attach it to a movieclip. As I am a newbie, can’t figure out what’s wrong. This is the code that I am using. I am writing this code for the button: btn_record.
TEST_record.fla is also attached.
Finally, How can I payback the attached audio file?
Please help.
on(press){
var activityLevel_pb:mx.controls.ProgressBar;
activityLevel_pb.mode = “manual”;
activityLevel_pb.label = “Activity Level: %3%%”;
this.createEmptyMovieClip(“sound_mc”, this.getNextHighestDepth());
var active_mic:Microphone = Microphone.get();
sound_mc.attachAudio(active_mic);
active_mic.onActivity = function(active:Boolean) {
if (active) {
activityLevel_pb.indeterminate = false;
activityLevel_pb.label = “Activity Level: %3%%”;
} else {
activityLevel_pb.indeterminate = true;
activityLevel_pb.label = “Activity Level: (inactive)”;
}
};
this.onEnterFrame = function() {
activityLevel_pb.setProgress(active_mic.activityLe vel, 100);
};
}
thanks in advance
Nish