
Код AS1/AS2:
data_xml.onLoad = function() {
colXML = data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes.length;
//trace(data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes.length)
for(i=0; i<colXML; i++){
trace(_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i])
movie1=i+objname;
objname=_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i].attributes.id;
trace(movie1)
//objname = _root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.name
ID1 = _root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i].attributes.id
//trace(ID1)
movie1=_root.attachMovie("ID"+ID1, objname, this.getNextHighestDepth());
//trace(_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.posX)
movie1._x=_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i].attributes.posX;
//trace(objname)
movie1._y=_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i].attributes.posY;
movie1._visible=_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i].attributes.vis;
movie1.loadMovie(_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[i].attributes.ssil, objname)
trace(objname)
//movie1.getURL(_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.sobONPRESS)
movie1.onRollOver = function () {
//trace("ssss")
getURL("http://pff.ru", "_blank")
this.getURL(_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.sobONPRESS)
/*if (movie1._root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.sobONPRESS) {
movie1.getURL(_root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.sobONPRESS);
}*/
}
//trace(movie1._root.data_xml.childNodes[0].childNodes[0].childNodes[0].childNodes[1].attributes.sobONPRESS);
//trace(_root.data_xml.nodeValue[0])
//objname++;
//movie1++;
} // for закрыли
};
Вопрос создает почему то 1 объект, а не 3 (их по запросу 3 проверял трейсом) и то последний. В чём проблема ?