Comunidad de diseño web y desarrollo en internet online

Problema con Flash y xml

Citar            
MensajeEscrito el 08 Abr 2010 04:20 pm
Hola a todos, quiero con este codigo habilitar unos botones los cuales tienen nombre de boton1, boton2, etc. pero al momento de ponerlo en un IF no me los muestra agradezco de antemano su ayuda, soy novato en esto, dejo codigo as:

contr.onRelease = function() {
gotoAndStop("Controladores");
_global.valor = 1;
ocultar();
generar();
}
bi.onRelease = function() {
gotoAndStop("Bios");
_global.valor = 0;
ocultar();
generar();
}
util.onRelease = function() {
gotoAndStop("Utilerias");
_global.valor = 2;
ocultar();
generar();
}
anti.onRelease = function() {
gotoAndStop("Antivirus");
_global.valor = 3;
ocultar();
generar();
}
off.onRelease = function() {
gotoAndStop("Office");
_global.valor = 4;
ocultar();
generar();
}

ocultar = function(){
boton1._visible = false;
boton2._visible = false;
boton3._visible = false;
boton4._visible = false;
boton5._visible = false;
boton6._visible = false;
boton7._visible = false;
boton8._visible = false;
boton9._visible = false;
boton10._visible = false;
boton11._visible = false;
boton12._visible = false;
}

checar = function(){
if(longitud == 1){
for(i=0;i<longitud;i++){
i = i+1;
boton[i]._visible=true;
trace(i);
}
}
if(longitud >= 2){
for(i=0;i<longitud;i++){
i = i+1;
boton[i]._visible=true;
trace(i);
i = i-1;
}
}
}

generar = function(){
var Bajar:XML = new XML();
Bajar.ignoreWhite = true;
Bajar.onLoad = function(success:Boolean){
if(success){
longitud = Bajar.childNodes[0].childNodes[_global.valor].childNodes.length;
trace(longitud);
checar();

}else{
trace("Error");
}
}
Bajar.load("descargas.xml");
}

en el xml:
<?xml version="1.0" encoding="utf-8"?>
<descargas>
<boton nombre="Bios">
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
</boton>
<boton nombre="Controladores">
<botoncito url=""></botoncito>
</boton>
<boton nombre="Utilerias">
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
</boton>
<boton nombre="Antivirus">
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
</boton>
<boton nombre="Office">
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
<botoncito url=""></botoncito>
</boton>
</descargas>

Por gjavih

3 de clabLevel



 

msie8
Citar            
MensajeEscrito el 15 Abr 2010 11:24 pm
mmmmmm no me entienden o no saben y estan igual q yo :(

Por gjavih

3 de clabLevel



 

msie8

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.