hello, i am new to corona. found this flipbook code and implemented it into my project. i have a main.lua with a global tabbar and a home.lua and another .lua file that if clicked will take you to the flipbook scene. the problem is i cant insert it into the screen group because my tabbar wont function, and it wont remove itself on button tap…here is the code.
local storyboard = require( “storyboard” )
storyboard.removeAll()
local scene = storyboard.newScene()
local flipbook = require (“flipbook”)
local widget = require( “widget” )
local function handleButtonEvent( event )
if ( “ended” == event.phase ) then
print( “Button was pressed and released” )
storyboard.gotoScene(“home”)
end
end
function scene:createScene ( event )
local group = self.view
local my = flipbook:newFlipbook(“images/background_back.png”, “mainshadow.png”, “newshadow.png”, “curlshadow.png” )
my.alpha = 0
my:addPage( “images/b.png” )
my:addPage( “images/b1.png” )
my:addPage( “images/b2.png” )
my:addPage( “images/b3.png” )
my:addPage( “images/b4.png” )
my:addPage( “images/b5.png” )
my:addPage( “images/b6.png” )
local button1 = widget.newButton
{
left = 100,
top = 200,
id = “button1”,
label = “Default”,
onEvent = handleButtonEvent
}
button1:toFront()
– Function to handle button events
displayGroup:insert(button1)
displayGroup:insert(my)
end
function scene:enterScene( event )
end
function scene:exitScene( event )
local group = self.view
display.remove(displayGroup)
storyboard.removeScene(“buddhism”)
addPage:removeSelf()
end
function scene:destroyScene( event )
end
scene:addEventListener( “createScene”, scene )
scene:addEventListener( “enterScene”, scene )
scene:addEventListener( “exitScene”, scene )
scene:addEventListener( “destroyScene”, scene )
return scene