com-api.js
Summary
No overview generated for 'com-api.js'
Method Summary
|
static void
|
recCommand(<string> c)
Recieves response from the flash item based on the command sent.
|
static void
|
sendCommand(<string> c,<string> p)
Sends command and properties to the flash item
|
function sendCommand(c,p) {
var d = "SEND\n";
d += "\tjscommand: "+c+"\n";
if (p) { d+= "\tjsprops: "+p+"\n"; }
dump(d);
fo = window.frames["mediaframe"].document["cheetah"];
fo.SetVariable("jsprops", p);
fo.SetVariable("jscommand", c);
}
function recCommand(c) {
var d = "RECEIVE\n";
d += "\tcommand: "+c+"\n";
dump(d);
fo = window.frames["mediaframe"].document["cheetah"];
jsdata = fo.GetVariable("jsdata");
switch(c) {
case 'init':
sendCommand("checkcom");
break;
case 'checkcom':
dump(jsdata+"\n");
eventobj.eventprop = "comactive";
break;
case 'error':
alert(jsdata);
break;
case 'globaltoolsdata':
main.globaltools.setData(jsdata);
break;
case 'themedata':
main.theme.setData(jsdata);
break;
case 'glossarydata':
main.glossary.setData(jsdata);
break;
case 'coursedata':
main.course.setData(jsdata);
break;
case 'current':
main.setData(jsdata);
break;
case 'pagetext':
main.page.setText(jsdata);
eventobj.eventprop = "pageready";
break;
case 'update':
main.getCurrent();
break;
case 'toggle':
eventobj.eventprop = "toggle";
break;
}
}
Documentation generated by
JSDoc on Tue Mar 4 12:01:48 2008