How can a back button be placed on a lua file using the slideView library? Also when I use the slideView library I get this error below.
attempt to index local ‘p’ a nil value
-
Would this mean all images in the set need to be exactly the same image size?
-
Would I insert the back button using…
Local backButton = display.newImage(“back.png”)
insert:eventListener(backbutton)
Thanks.
this is ‘p’ in slideView.lua
[code]
images = {}
for i = 1,#imageSet do
local p = display.newImage(imageSet[i])
local h = viewableScreenH-(top+bottom)
if p.width > viewableScreenW or p.height > h then
if p.width/viewableScreenW > p.height/h then
p.xScale = viewableScreenW/p.width
p.yScale = viewableScreenW/p.width
else
p.xScale = h/p.height
p.yScale = h/p.height
end
end
g:insert§
[code]
[import]uid: 88495 topic_id: 35085 reply_id: 335085[/import]