En fotograma 1
Cita:
En fotograma 2stop();
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();
};
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();
};
Cita:
Gracias! ;) 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()};
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()};