49
Next, use this bit of script to embed the flash file in the desired area of the web page:
<script type="text/javascript" language="JavaScript">
document.write('<object
id="CRM-WIC"
classid="clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs
/flash/swflash.cab#version=6,0,29,0" width="100%"
height="100%">');
document.write('<param name="movie" value="'+'" />');
document.write('<param name="quality" value="high" />');
document.write('<param
name="FlashVars"
value="callerID='+theIP+'" />');
document.write('<embed
name="flashMovie"
src="'+'"
FlashVars="callerID='+theIP+'" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="100%"
height="100%"></embed>');
document.write('</object>');
</script>
The IP Address may now be access from your Flash action scripts in the variable "
callerID
".
Step 2: Call RPC with HTTP Post
Once you have the IP address, you are able to access the RPC server. Load the method and it's
parameters into a LoadVars() object as shown below, then make the call with sendAndLoad().
// Get CRM-WIC IP
RPCServerIP = [callerID, or whatever you used to get the IP
address of the CRM-WIC];
// Initialize Call & Response Tokens
CRM-WIC_Call = new LoadVars()
CRM-WIC_Response = new LoadVars()
// Set up RPC method and parameters you desire to call.
// Note that these are all URL-encoded strings.
// You may assign values based on buttons, text fields,
constants, or whatever else is appropriate for your page.
CRM-WIC_Call.method = "[Desired RPC Method]";
CRM-WIC_Call.param1 = "[Parameter 1 for the Method]";
CRM-WIC_Call.param2 = "[Parameter 2 for the Method]";
CRM-WIC_Call.param3 = "[Parameter 3 for the Method]";
[etc.]
// Call the RPC using HTTP Post
CRM-WIC_Call.sendAndLoad("http://"+RPCServerIP"/RPC", CRM-
WIC_Response, POST);
Содержание CRM-WIC
Страница 1: ...Reference Manual Programming Guide Room Monitor Web Intelligent Controller Model CRM WIC...
Страница 7: ...7 Box Contents Box Contents for the CRM WIC Web Intelligent Controller Model CRMWIC Power Adapter...
Страница 8: ...8 Hardware User Interface Hardware User Interface for the CRM WIC...
Страница 16: ...16 For full details see the RPC section at the end of this manual...
Страница 43: ...43 This expression resolves to this value 0 1 4 3 1 Hello Hello 0...
Страница 98: ...98 Index...