Hi there!
I recently started coding a app wich requires some screen transtioning.
what I have so far is my home/welcome page done.
now, on my home screen I have 3 buttons I made with .widget
What I want to do is make it so that once the begginner button is clicked/tapped it moves on to the next screen wich will have 3 more buttons.
ALSO: I have setup both main.lua and my next page bcat.lua to work with storyboard.
I tried making a function that did that on release…and it doesnt come up with a error but it doesnt do anyhing. I can click it any it does nothing.
if someone can give me some advice that would be great. down below is what I have so far for my code ON BOTH PAGES.
main.lua
main.lua
local storyboard = require “storyboard”
storyboard.purgeOnSceneChange = true
local widget = require “widget”
display.setStatusBar(display.HiddenStatusBar)
– load scenetemplate.lua
storyboard.gotoScene( “scenetemplate” )
– Add any objects that should appear on all scenes below (e.g. tab bar, hud, etc.):
local backround = display.newImage(“backround.jpg”)
backround:setReferencePoint(display.CentreReferencePoint)
backround. x = 0
backround. y = 210
local text = display.newText(“Welcome!” , 85,05,nativesystemfont,35)
local text = display.newText(“My level of knowledge is…” , 23,55,nativesystemfont,25)
local function bcat(event)
storyboard.gotoScene(“bcat”)
end
local Beginner = widget.newButton { label=“Beginner”, onRelease bcat}
Beginner.x = 160
Beginner.y = 150
local Moderate = widget.newButton {label=“Moderate”}
Moderate.x = 160
Moderate.y = 275
local Expert = widget.newButton {label=“Expert”}
Expert.x = 160
Expert.y = 400
bcat.lua
local storyboard = require (“storyboard”)
local scene = storyboard.newScene()
function scene:createScene(event)
local backround = display.newImage(“backround.jpg”)
self.view:insert(backround)
backround:setReferencePoint(display.CentreReferencePoint)
backround. x = 0
backround. y = 210
end
scene:addEventListener(“createScene” , scene)
return scene
if someone could please look over what i have and tell me what im doing worng that would be great!!!