Foros del Web » Creando para Internet » Flash y Actionscript »

Checar script

Estas en el tema de Checar script en el foro de Flash y Actionscript en Foros del Web. Alguien me podría decir si este script tiene errores... gracias! ;) En fotograma 1 Cita: stop(); my_xml=new XLM(); my_xml.ignoreWhite=true; my_xml.onLoad=parse; my_xml.load("slidedata.xml"); function parse (success) { ...
  #1 (permalink)  
Antiguo 22/07/2008, 09:55
 
Fecha de Ingreso: mayo-2008
Mensajes: 10
Antigüedad: 15 años, 10 meses
Puntos: 0
Checar script

Alguien me podría decir si este script tiene errores... gracias! ;)

En fotograma 1

Cita:
stop();
my_xml=new XLM();
my_xml.ignoreWhite=true;
my_xml.onLoad=parse;
my_xml.load("slidedata.xml");
function parse (success) {
if (!success){
trace("problem");
return;
}
allSlides=new Array();
var slides=this.childNodes[0].childNodes;
for (var s=0; s<slides.length; s++){
var thisData= new Object();
var nodesInSlide=slides[s].childNodes.length;
for (var n=0; n< nodesInSlide;n++){
var thisNodeName=slides[s].childNodes[n].nodeName.toUpperCase();
if(thisNodeName=="BULLETS"){
var theVal=new Array();
totalBullets=slides[s].childNodes[n].childNodes.length;
for (var b=0;b<totalBullets;b++){
theVal.push(slides[s].childNodes[n].childNodes[b].firstChild.nodeValue);
}// for "b"
}else{
var theVal=slides[s].childNodes[n].firstChild.nodeValue;
}//if
thisData[slides[s].childNodes[n].nodeName]=theVal;
}//for "n"
allSlides[s]=thisData;
}//for "s"
_root.nextFrame();
};
En fotograma 2

Cita:
back_btn.onPress=function(){ goPage(-1)}
forward_btn.onPress=function(){ goPage(1)}
currentPage=-1;
goPage(1);
function goPage(direction){
currentPage+=direction;
title_txt.text=allSlides[currentPage].title;
post_txt.text=allSlides[currentPage].post_content;
thePhoto.loadMovie(allSlides[currentPage].photo);
bullNum=-1;
nextBullet()
}
function nextBullet(){
var topY=107
var spacing=30;
}
var steps=[365, 375, 385, 395, 405];
function nextBullet(){
var topY=107;
var spacing=30
var steps=[365, 375, 385, 395, 405];
bullNum++;
_root.attachMovie("animated", "bull_"+bulNum,bulNum);
var thisOne=_root["bull_"+bullNum];
thisOne._x=9000;
thisOne._y=topY+( bullNum*spacing );
thisOne.bullet_txt.text=allSlides[currenPage].bullets[bullNum];
thisOne.steps=steps;
thisOne.curStep=0;
thsiOne.onEnterFrame=function(){
this._x=this.steps[this.curStep];
this.curStep++;
if(this.curStep>=this.steps.length){
this.onenteFrame=null;
}
}
}
_root.onMouseDown=function(){nextBullet()};
Gracias! ;)
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:00.