hi all,
i’ve tryng to convert a game working well with storyboard. not too hard, going from one scene to the other (and vice-versa) via a reset screen.
reset screen in which i say if previous scene=scene1 goto scene2 etc…
that works well however the scene:hide - phase = “did” NEVER HAPPENS
I have printed every scene entry and i can see that it never goes through the “did” phase.
it does go through the scene:destroy though
I triple checked the syntax for hours and found other bizarre behaviours. I noticed that problem because my enterFrame listener of scene1 was still active when in scene2. it crashed trying to apply a force to an object that didnt exist anymore. there too, I added
Runtime:removeEventListener(“enterFrame”, everyframe)
pretty much everywhere in the scene:hide (of “will” as the “did” doesnt seem to be called) and in the scene:destroy.
I did it many times etc…
no way, the enterframe listener keeps running like a mad dog.
function everyframe(event) if (vlad11.head) then         vlad11.head:applyForce( 0, -100, vlad11.head.x, vlad11.head.y ) end .. CRASH end Runtime:addEventListener("enterFrame", everyframe)
for a while I thought maybe i’m missing an ‘end’ into a set of if…then…end and maybe corona gets confused. but i checked it all .
anyone having similar problem ?
Copyright (C) 2009-2014  C o r o n a   L a b s   I n c .         Version: 3.0.0         Build: 2014.2511 Platform: GT-I9300 / x64 / 6.2 / Intel(R) HD Graphics 4000 / 4.0.0 - Build 10.18.10.3379 / 2014.2511 Android WARNING: display.setStatusBarMode() not supported in the simulator for GT-I9300 device WARNING: Simulator does not support multitouch events WARNING: Simulator does not support multitouch events WARNING: The 'ads' provider (admob) is not available on the simulator createScene scene1 previous\>    nil WARNING: The 'ads' library is not available on this platform. tony2 and tony22 created tony22.head.x  28 scene1 scene:show\>      will    1       table: 0E336278 scene1 scene:show WILL scene1 starting Runtime:addEventListener scene1 scene:show\>      did     1       table: 0E336278 scene1 scene:show DID scene1 starting Runtime:addEventListener here is tap\_reset\_level\>        true    true scene1 going to reset scene1 scene:hide phase\>        will scene1 removeEventListener enterFrame removing celeb timer reset  scene:create\>    scene1 scene1 scene:destroy reset changeScene prior\_scene\>  scene1 here is reset. going to \>       scene2 createScene scene2 previous\>    reset WARNING: The 'ads' library is not available on this platform. scene2  scene:show\>     will    308 scene2 show-will\>       2 lv1\>refreshCount\>       2 scene2 Runtime:addEventListener scene2  scene:show\>     did     308 scene2 show-did\>        2 scene2 Runtime:addEventListener Runtime error c:\claude\aaacorona\g20 summit-composer\scene1.lua:635: attempt to call method 'applyForce' (a nil value) stack traceback:         c:\claude\aaacorona\g20 summit-composer\scene1.lua:635: in function \<c:\claude\aaacorona\g20 summit-composer\scene1.lua:630\>         ?: in function \<?:221\>