我目前有这个。
幻灯片按如下方式分层:幻灯片1在顶部,幻灯片2在后面,最后滑动3。当我淡出幻灯片1时,弹出幻灯片2。如果我淡出幻灯片2,则会弹出幻灯片3。但是,如果我淡出幻灯片3,则不会弹出任何内容,因为幻灯片1的alpha现在为0.当我尝试将其在代码中的任何位置更改为alpha 1时,它将覆盖幻灯片3以在顶部分层。我尝试使用parent.setChildIndex(childObject, i)
,但我不知道这是如何工作的。请在答案中解释。
function slide1show ():void{
var slidepage2:Tween = new Tween(slide3,"alpha",Strong.easeOut,1,0,1,true);
currentslide = 1
setTimeout(slidechecker,1000)
}
function slide2show ():void{
var slidepage1:Tween = new Tween(slide1,"alpha",Strong.easeOut,1,0,1,true);
currentslide = 2
setTimeout(slidechecker,1000)
}
function slide3show ():void{
var slidepage3:Tween = new Tween(slide2,"alpha",Strong.easeOut,1,0,1,true);
currentslide = 3
setTimeout(slidechecker,1000)
}
slidechecker();
function slidechecker():void{
if (currentslide == 1){
setTimeout(slide2show,3000)
}
if (currentslide == 2){
setTimeout (slide3show,3000)
}
if (currentslide == 3){
setTimeout (slide1show,3000)
}
}