Hi All,
I used the following code to show a stack of images one after each other.
local function slideShow(delayTime, imageFNs)
local previousImageShow = system.getTimer();
local imIdx=0;
repeat
if system.getTimer()-previousImageShow\>delayTime then
if finishImage then
finishImage.fade=1;
end
imIdx = imIdx+1;
local imageFN = imageFNs[imIdx]
print(" Reading Image "..imageFN)
local finishImage = display.newImage(imageFN);
finishImage.x=D\_W/2
finishImage.y=D\_H/2
finishImage:scale(D\_W/finishImage.contentWidth,D\_H/finishImage.contentHeight)
zeroLayer:insert(finishImage)
transition.to(finishImage, {time=delayTime, alpha=0, onComplete=
function(self) display.remove(self); self = nil; end})
previousImageShow = system.getTimer()
end
until imIdx==#imageFNs
end
local delayTime = 2500;
local imageStackFN = {"1.png", "2.png", "3.png"}
slideShow(delayTime, imageStackFN)
However, it shows only the last image (3.png). The print output works almost fine, I mean it prints the right image file names with a delay after each image. I even commented the transition.to line but still the same problem.
Any comment/solution would be appreciated.
Thanks,
Arash [import]uid: 80320 topic_id: 35474 reply_id: 335474[/import]