2月27日 天气阴 下了点小雨
昨天做了个简单的小实验。今天做另一个,然后明天再进行总结。
昨天让COLDFUSION给FLASH返回了一个日期值。今天我们让coldfusion帮助FLASH来完成一些计算功能。
Page/test2/test2.cfm
Code:
test2.fla
code:
#include "NetDebug.as"
#include "NetServices.as"
my_conn=NetServices.createGatewayConnection("http://localhost/flashservices/gateway");
my_test=my_conn.getService("s22.page.test2",this);
my_test.test2(20,500);
test2_result=function (s) {
trace(s)
}
test2_status=function(s){
trace("error")
}
呵呵~比昨天进步了点。现在向cfm传递了两个参数。并且收回了结果。
测试结果: 520
实验结束。
现在来继续理论学习。Coldfusion定义了一个名为flash.的scope。
The scope has several pre-defined variables. Use these can access parameters passed from flash application and return to flash app.
flash .params 一个包含由FLASH app传递来的参数的array 后面详细讲
flash.result 返回到flash app的结果对象类型不确定