sdk - Corona storyboard.gotoScene options not working -
i'm using simple line of code in corona transition between scenes - transition happens effect doesn't.
storyboard.gotoscene( "splash", "fade", 2000 )
i've compiled build xcode simulator see if fade effect work there , doesn't.
complete code -
local storyboard = require "storyboard" local scene = storyboard.newscene() local splashgroup = display.newgroup() local function onbackgroundtouch() storyboard.gotoscene("mainmenu", "fade", 2000) end --called if scene hasn't been seen function scene:createscene (event) local logoimage = display.newimage("roxislogo.png") logoimage.x = display.contentwidth/2 logoimage.x = display.contentheight/2 splashgroup:insert(logoimage) logoimage:addeventlistener("tap", onbackgroundtouch) end function scene:enterscene(event) splashgroup.alpha=1 end function scene:exitscene(event) splashgroup.alpha=0 end --"createscene" called whenever scene first called scene:addeventlistener("createscene", scene) --"enterscene event dispatched whenever scene transition has finished scene:addeventlistener("enterscene", scene) --"exitscene" event dispatched before next scene's transition begins scene:addeventlistener("exitscene", scene) return scene
i don't see adding scene's view. @ beginning of createscene , enterscene there line this:
group = scene.view
this group display group , if want storyboard transition scene on or off, have insert each display object group. you're creating own group called localgroup, fine, group needs put "group"
also, things in createscene() happens off screen, it's transitioned on screen. if create display objects in enterscene, pop view.
finally setting alpha in enterscene , hiding in exitscene. kill transitions too. i'd loose alpha settngs install add "group = scene.view" lines inside createscene() , enterscene() functions , add objects group.
Comments
Post a Comment