hakxx
New Member
Posts: 5
37 / /
Joined: May 2010
|
O.P. RE: Q about PlaySound()
code: function OnGetScriptMenu(Location)
{
var ScriptMenu = "<ScriptMenu>";
ScriptMenu += "<MenuEntry Id=\"s1">sound1</MenuEntry>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;
}
function OnEvent_MenuClicked(sMenuId, nLocation, iOriginWnd) {
if (sMenuId=="s1"){
DownloadUpdateFile("http://ex.com/001.mp3");
}
}
function DownloadUpdateFile(sFile)
{
var Started = MsgPlus.DownloadFile(sFile);
if(Started)
Debug.Trace("Downloading file, waiting for event");
else
Debug.Trace("Couldn't start the download");
}
function OnEvent_DownloadFileComplete(Url, OutFile, Success)
{
Debug.Trace("DownloadFileComplete event received for " + Url);
Debug.Trace(" Success: " + Success);
if(Success)
{
MsgPlus.PlaySound(OutFile);
}
}
^^ it this code true ?
Thank you very very much
This post was edited on 05-12-2010 at 12:00 AM by hakxx.
|
|