/**
* 加上隨機數, 解決ie緩存的問題
* prefix 前綴,例如服務器地址
* endfix 後綴,如隨機數,或者flash的版本號
* */
public static function randomUrl(url:String, prefix:String="", endfix:String=""):String{
endfix = StringTools.equals(endfix, "") ? Math.random().toString() : endfix;
return prefix + url + "?_key=" + endfix;
}
/**
* 請求跨域策略文件 BASEURL 服務器地址
* */
public static function loadPolicyFile(domain:String=null):void{
if ( domain == null){
domain = BASEURL + "ibp/crossdomain.jsp";
}
try{
flash.system.Security.loadPolicyFile(domain);
}catch(e:Error){
trace(e.message);
}
}
請求服務器數據,解決IIE緩存問題
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Adobe AIR介紹(轉載)
iteye_96
2020-02-26 05:09:37
深入分析Flex [Bindable] 以及使用方法(轉載)
iteye_96
2020-02-26 05:09:37
初識Flex Data Services(FDS)(轉載)
iteye_96
2020-02-26 05:09:37
Adobe AIR技術優勢(裝載)
iteye_96
2020-02-26 05:09:37
label/textBase showTruncationTip/isTruncated屬性
iteye_96
2018-08-31 08:55:08
Event類的實例方法
iteye_96
2018-08-31 08:54:49
使用ItemRenderer處理基於List容器的顯示內容 [DataGrid, Tree, List等]
iteye_96
2018-08-31 08:54:36
Flex 4 and the Text Layout Framework
iteye_96
2018-08-31 08:54:36
關於flex 的命名空間及訪問控制符問題
iteye_96
2018-08-31 08:54:31
如何加載一個swf文件中類的方法
iteye_96
2018-08-31 08:54:31
flex3 ,flex4 skin
iteye_96
2018-08-31 08:54:30