function init(){ var flashvars = {}; flashvars.myServer = "rtmp://audiodropboxes.com/onlineArabic/demo"; flashvars.mySound = "snd_314422079"; flashvars.myDuration = "0"; var params = {}; params.menu = "false"; var attributes = {}; attributes.id = "denRecorder"; attributes.name = "denRecorder"; swfobject.embedSWF("audioRecorder1.swf", "recorderDIV", "1", "1", "10.0.0", false, flashvars, params, attributes); } function activityLevel(msg){ //document.getElementById("micLevelPercent").innerHTML = msg; document.getElementById("meter").style.width = msg + "px"; } function playbackLevel(time, progress){ document.getElementById("meter").style.width = (100*progress) + "px"; document.getElementById("streamDuration").innerHTML = time; } function recorderMessage(msg){ document.getElementById("statusText").innerHTML = msg; } function netStatus(msg){ document.getElementById("netStatusText").innerHTML = msg; switch (msg){ case "NetConnection.Connect.Success" : document.getElementById("meter").style.width = "0px"; break; case "recording" : $("#meter").css("background-color", "#ff0000"); break; case "stopped" : $("#meter").css("background-color", "#ccc"); break; } } function setPreview(){ document.getElementById("meter").style.backgroundColor = "#ccc"; } function setRecord(){ document.getElementById("meter").style.backgroundColor = "#F04330"; } function setPlayback(){ document.getElementById("meter").style.backgroundColor = "#428AD6"; } function setDuration(x){ //$.("#streamDuration").html(x); document.getElementById("streamDuration").innerHTML = x; } function recordingTime(x){ document.getElementById("streamDuration").innerHTML = x; } function changeMe(color){ document.getElementById("meter").style.backgroundColor = color; } function sendRecord(){ thisMovie("denRecorder").jsRecord(); } function sendStop(){ thisMovie("denRecorder").jsStop(); } function sendPlay(){ thisMovie("denRecorder").jsPlay(); } function thisMovie(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName]; } else { return document[movieName]; } }