请参阅下面的代码:
protected function getXMLUrl(vid:String):String {
//return 'http://v.iask.com/v_play.php?vid='+ vid;
var rand:* = Math.random();
var f1:* = function (param1:Number) : Number {
var _loc_2:* = param1.toString(2);
var _loc_3:* = _loc_2.substring(0, _loc_2.length - 6);
return parseInt(_loc_3, 2);
};
var Str1:* = "Z6prk18aWxP278cVAH";
var Date1:* = new Date();
var Num:* = this.f1(int(Date1.time / 1000));
var str:* = vid.toString() + str1 + Num + rand.toString();
var hash:* = MD5.hash(str);
var encode:* = hash.substr(0, 16).toString() + Num.toString();
return 'http://v.iask.com/v_play.php?vid='+ vid + "&ran=" + rand + "&p=i&k=" + encode;
}
以下是我得到的错误
1061: Call to a possibly undefined method f1 through a reference with static type
1120: Access of undefined property MD5.
1120: Access of undefined property str1.
答案 0 :(得分:0)
没关系,我修好了
添加
import com.adobe.crypto.MD5;
还删除了所有" :*"