一個小實驗
效果: http://qhwa.6to23.com/temp/loadSWF_fromASP.swf
ASP地址: http://qhwa.6to23.com/temp/loadSWF.asp
ASP内容:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<%
if(Request.TotalBytes) {
//如果有POST數據,當然,也可以加入其他判斷條件,比如cookie、session變量等
Response.ContentType = "application/x-shockwave-flash";
//設置MIME類型
var adTypeBinary = 1;
var strFilePath;
var strFilePath = Server.MapPath("wave2.swf");
//這才是真正的swf-URL.
var objStream = Server.CreateObject("ADODB.Stream");
objStream.Open;
objStream.Type = adTypeBinary;
objStream.LoadFromFile(strFilePath); //載入外部文件
Response.BinaryWrite(objStream.Read); //輸出數據流
objStream.Close; //關閉數據流
//delete objStream;
} else {
//八成是想破解的兄弟,問候一下:)
Response.Write("come on");
}
%>
Flash中的AS:
var myName = "random,hoho~";
loadMovieNum("loadSWF.asp", 1, "POST");
loadMovie之後,即使_url屬性也不會暴露核心swf的地址。不過依然是要下載到緩存,這是使用loadMovie后避免不了的,如果MM能分別提供下載數據和解析數據成MC的API,應該會好些。
效果: http://qhwa.6to23.com/temp/loadSWF_fromASP.swf
ASP地址: http://qhwa.6to23.com/temp/loadSWF.asp
ASP内容:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<%
if(Request.TotalBytes) {
//如果有POST數據,當然,也可以加入其他判斷條件,比如cookie、session變量等
Response.ContentType = "application/x-shockwave-flash";
//設置MIME類型
var adTypeBinary = 1;
var strFilePath;
var strFilePath = Server.MapPath("wave2.swf");
//這才是真正的swf-URL.
var objStream = Server.CreateObject("ADODB.Stream");
objStream.Open;
objStream.Type = adTypeBinary;
objStream.LoadFromFile(strFilePath); //載入外部文件
Response.BinaryWrite(objStream.Read); //輸出數據流
objStream.Close; //關閉數據流
//delete objStream;
} else {
//八成是想破解的兄弟,問候一下:)
Response.Write("come on");
}
%>
var myName = "random,hoho~";
loadMovieNum("loadSWF.asp", 1, "POST");