2012-10-29 2 views
0

내 플래시 응용 프로그램에서 XML 파일을 해석하려고합니다.로컬 컴퓨터에서 XML 파일로드 문제 (URL을로드 할 수 없음)

function onFinish(success_boolean, results_obj, xml) 
{ 
    if (success_boolean) 
    { 
     play(); 
    } // end if 
} // End of the function 
Stage.align = "MC"; 
Stage.scaleMode = "noScale"; 
url = "25358"; 
_root.cacheKiller = "true"; 
stop(); 
var parsed_obj = {}; 
var unCash = new Date().getTime(); 
if (_root.cacheKiller == "true") 
{ 
    fileToLoad = url + "_main.xml?cacheKiller=" + unCash; 
    fileToLoad = url + "_main.xml"; 
} 
else 
{ 
    fileToLoad = url + "_main.xml"; 
} // end else if 
gs.dataTransfer.XMLParser.load(fileToLoad, onFinish, parsed_obj); 
_root.emp.useHandCursor = 0; 
_root.mus = 1; 
_root.n = 1; 
_root.num = 1; 

내가 얻을 출력은 다음과 같습니다 :

열기 오류 URL '파일 : /// C |/시도/25358undefined'내 코드는 모양

사람이 왜 내가 할 수있는 어떤 생각을 가지고 있습니까 이 파일에 액세스 할 수 없습니까? URL이 작동하는지 확인했습니다.

+1

'unCash'에'uint'라고 입력하여 유형을 지정하십시오. 그렇지 않으면 이상한 결과를 제공하는 "String + anything"작업 문제가 발생할 위험이 있습니다. – Vesper

+0

어떻게하면됩니까? – user1782306

답변

0

잘못된 URL이 있습니다. fileToLoad에 잘못된 값이 있음을 의미합니다. 이 변수를 추적하십시오.

관련 문제