我在as2中使用getUrl时遇到了一个问题,当我使用测试电影运行swf时,链接可能会起作用,但如果我运行发布的文件,会得到错误的url,例如
通过测试电影-run : getting -> www.google.com
获取已发布的swf文件:-run ->file:///C:/Users/moata/Desktop/actionScript/www.google.com
dots.ignoreWhite = true;
dots.load('links.xml');
dots.onLoad = function(success:Boolean){
if(success){
xmlNode = this.firstChild;
var all:MovieClip = attachMovie("test","all",depth);
setTimeout(startMe,6000);
}else{
trace("Could not load XML");
}
function startMe (){
for(i=1;i<=6;i++){
all['btn'+i].onRelease = function() {
for(i=0;i<6;i++){
var name = this;
if(String(xmlNode.childNodes[i].attributes.TITLE) == String(name)){
getURL(xmlNode.childNodes[i].childNodes[0].nodeValue, "_blank");
}
}
}
}
}
};发布于 2012-08-22 09:32:51
我只需要在getRUL中添加如下getURL("http://www.google.com");,而不是getURL("www.google.com");
https://stackoverflow.com/questions/12065187
复制相似问题