Comentario:Si pongo un numero dentro de la variable de este modo nombreDinamico[+i].var_x=50; funciona perfecto pero si pongo el codigo para leer el xml no funciona, tanto con xpatch o con AS pierde el dato o mejor dicho no lo debe pasar como numbero. como debo hacer?
................................................................Recorte
//
.............................................
//
function launch_function(n, c, d, l, r, a, p, pi) {
//text_txt.text = "<u><b>Nombre:</b></u> "+t+"\n\n<u><b>Detalle:</b></u> "+d;
...........................................................................................
}
//
function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(7);
}
..................................................................
//
football.onRelease = function() {
//
....................................................................................
//FUNCTION DELETE CLIPS
var largo_mods_xml1 = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = 'rugby']/*");
var largo_modulos_xml1 = largo_mods_xml1.length;
for (i=0; i<largo_modulos_xml1; i++) {
//removeMovieClip("content_a.content_mc.my_button"+i);
}
//FUNCTION CREATE & DUPLICATE MODULES
var largo_mods_xml = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/*");
var largo_modulos_xml = largo_mods_xml.length;
for (i=0; i<largo_modulos_xml; i++) {
//content_a.content_mc.createClassObject(mx.controls.Button, "my_button"+i, 10+i, {label:text_txt1});
//ref_nuevo_modulo = content_a.content_mc["my_button"+i];
//
giocatori_mc.cont_mc.btn_mc.duplicateMovieClip("btn"+i, 10+i);
ref_nuevo_modulo = giocatori_mc.cont_mc["btn"+i];
//TITLE BUTTON
var text_txt1 = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/nome/*");
var myStr:String = " "+text_txt1;
ref_nuevo_modulo.buttonText.buttText.htmlText = myStr.toUpperCase();
//
//INFO %
//_root._potenza.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/potenza/*");
_root._velocita.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/velocita/*");
_root._stacco.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/stacco/*");
_root._resistenza.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/resistenza/*");
_root._tecnica.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/tecnica/*");
_root._precisione.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/precisione/*");
///////////////////////////////////
//
ref_nuevo_modulo.setSize(150, 21);
ref_nuevo_modulo._y = i*(alto_modulo+off_set);
//
ref_nuevo_modulo._nome = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/nome/*");
ref_nuevo_modulo._cognome = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/cognome/*");
ref_nuevo_modulo._datadinacista = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/natoil/*");
ref_nuevo_modulo._luogodinacista = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/natoa/*");
ref_nuevo_modulo._ruolo = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/ruolo/*");
ref_nuevo_modulo._alteza = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/altezza/*");
ref_nuevo_modulo._peso = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/peso/*");
ref_nuevo_modulo._piede = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/piede/*");
//%%%%%%%%%%%%%%%%
//over()
//ref_nuevo_modulo.onRollOver = over;
ref_nuevo_modulo.onRollOut = ref_nuevo_modulo.onReleaseOutside=out;
//
//ffff = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/potenza/*");
ref_nuevo_modulo.var1 = imagenes_xml.firstChild.firstChild.firstChild.childNodes[5].childNodes;
//XPathAPI.selectNodeListimagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/potenza/*");
//+i*21;
//myMov[1] = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/potenza/*");
//ref_nuevo_modulo._potenza = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/potenza/*");
//
ref_nuevo_modulo.onRollOver = function() {
//trace(imagenes_xml.firstChild.firstChild.firstChild.childNodes[5].childNodes);
myMov[1] = imagenes_xml.firstChild.firstChild.firstChild.childNodes[5].childNodes;
};
ref_nuevo_modulo.onRelease = function() {
mueveme(this.var1);
//%%%%%%%%%%%%%%%%
//_root._velocita.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '"+i+"']/velocita/*");
//_root._stacco.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = "+i+"]/stacco/*");
//_root._resistenza.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/resistenza/*");
//_root._tecnica.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/tecnica/*");
//_root._precisione.htmlText = XPathAPI.selectNodeList(imagenes_xml.firstChild, "/root/categoria[@desc = '"+this._name+"']/giocatore[@id = '0']/precisione/*");
//
//_root.barra_mc.muevo(0, 100)
//trace("grabe pos anterior "+this._potenza);
//_root.barra_mc.pos1 = _root.barra_mc.pos2;
launch_function(this._nome, this._cognome, this._datadinacista, this._luogodinacista, this._ruolo, this._alteza, this._peso, this._piede);
//n, c, d, l, r, a, p, pi
};
}
};//barra_mc.bar1_mc.
function mueveme(one:Number) {
trace("myVar"+myVar);
muevo(myMov[0], myMov[1]);
myMov[0] = one;
trace("myMov[0] "+myMov[0]);
}
//
function muevo(d, a) {
with (bar1_mc.line_mc) {
inicio = d;
final = a;
trace("a "+final);
trace("d "+inicio);
//var soco:Number = final-inicio;
//trace("soco "+soco);
distancia = final-inicio;
//trace("essste: "+distancia);
duracion = 15;
//frames
tiempo = 0;
//contador
}
bar1_mc.line_mc.onEnterFrame = function() {
with (this) {
trace("a "+a);
_x = Circ.easeOut(tiempo++, inicio, distancia, duracion);
trace("distancia "+distancia);
if (tiempo>duracion) {
delete onEnterFrame;
}
}
};
}//[/code]
