flash 2.0 读取xml
这是用flash 2.0制作的图片切换效果代码哦,里面包括有读取xml并分析节点的代码哦。
stop ();
if (myxml == undefined)
{
myxml = "images_2/flash2/shell.xml";
} // end if
doc = new XML();
doc.load(myxml);
doc.ignoreWhite = true;
doc.onLoad = function (success)
{
if (success)
{
play ();
} // end if
};
function fx()
{
var _loc4 = new Object();
_root.resource_info = [];
if (doc.firstChild.hasChildNodes())
{
var _loc3 = doc.childNodes[0];
for (var _loc2 = 0; _loc2 < _loc3.childNodes.length; ++_loc2)
{
_root.resource_info[_loc2] = _loc3.childNodes[_loc2].firstChild.nodeValue;
} // end of for
play ();
} // end if
} // End of the function
stop ();
fx();
补充:flash教程,动画技术