Flash 不能显示图片,急~~~~~~~~~~··
脚本:ActionScript 2.0
问题:
我要读取XML里面的保存的图片名字,请看我以下的代码,我在FLASH CS3 中 用Ctrl + Enter 可以显示图片,单独打开SWF文件也可以显示图片,
但是放到网站上面用http://localhost/website 这样就不能显示图片出来了,请问是怎么回事。有达人遇到相应的问题么。
var fullPath = "./";
var introURL = new String();
var xmlconnection = new XML();
xmlconnection.ignoreWhite = true;
xmlconnection.load("./info_flash_path.xml");
xmlconnection.onLoad = function (success){
if (success){
_root.introURL = xmlconnection.firstChild.childNodes[0].childNodes[0].nodeValue;
gotoAndPlay(_currentframe + 1);
}else{
trace ("fail~~~~, can not load info_flash_path.xml file .");
}
};
stop ();
======================================================================
var xmlIntroImage = new XML();
xmlIntroImage.ignoreWhite = true;
xmlIntroImage.load(fullPath + "xml/" + introURL);
xmlIntroImage.onLoad = function (success)
{
gotoAndPlay(_currentframe + 1);
};
stop ();
问题:
我要读取XML里面的保存的图片名字,请看我以下的代码,我在FLASH CS3 中 用Ctrl + Enter 可以显示图片,单独打开SWF文件也可以显示图片,
但是放到网站上面用http://localhost/website 这样就不能显示图片出来了,请问是怎么回事。有达人遇到相应的问题么。
var fullPath = "./";
var introURL = new String();
var xmlconnection = new XML();
xmlconnection.ignoreWhite = true;
xmlconnection.load("./info_flash_path.xml");
xmlconnection.onLoad = function (success){
if (success){
_root.introURL = xmlconnection.firstChild.childNodes[0].childNodes[0].nodeValue;
gotoAndPlay(_currentframe + 1);
}else{
trace ("fail~~~~, can not load info_flash_path.xml file .");
}
};
stop ();
======================================================================
var xmlIntroImage = new XML();
xmlIntroImage.ignoreWhite = true;
xmlIntroImage.load(fullPath + "xml/" + introURL);
xmlIntroImage.onLoad = function (success)
{
gotoAndPlay(_currentframe + 1);
};
stop ();
...全文


