\n'); } function enableTTS(){ if (navigator.appName.indexOf("Microsoft") != -1){ VoiceObj = new ActiveXObject("Sapi.SpVoice"); } } function MainPreloader_DoFSCommand(command, args){ if (command == "messageBox"){ alert(args); return true; } if (command == "speak"){ VoiceObj.Speak(args, 3); //params = 3: 1 for asynch and 2 for purge existing (see below) } if (command == "resize"){ document.getElementById("sco").style.width = args.substr(0, args.indexOf(","))+"px"; document.getElementById("sco").style.height = args.substr(args.indexOf(",") + 1, args.length)+"px"; } if (command == "fullscreen"){ document.getElementById("sco").style.width = "100%"; document.getElementById("sco").style.height = "100%"; } if (command == "stopTTS"){ VoiceObj.Speak('', 2); //params 2 to purge existing voices } }