Hi all,
I am working on my first app and am trying to learn the Storyboard API. I think I’m beginning to understand how to use each listener function. Maybe.
What I’m still trying to understand is why (in the sample code included with Corona) are the local variables and, especially, the onSceneTouch function declared OUTSIDE of the listener functions “createScene” or “enterScene?”
The notes in the template say “–Some things you might want to do in the “enterScene” event listener include things like positioning objects in specific places, show a message to the user, start physics, add event listeners (touch, enterFrame, etc), etc.”
HOWEVER, what I think I see is that the onSceneTouch listener function is defined outside of everything else and then assigned to image.touch in the “createScene” function. Why is it not done in the “enterScene” function, as the notes suggest?
I think I might understand the template better if the code showed individual buttons used to change scenes. Maybe.
All I’m really trying to do at this point is to put my simple game code in scene1 and then create a scene2 (as a sceneOverlay) for game options such as restart, resume, etc. But before I get there, I’m trying to learn the Storyboard API first.
ANY suggestions, examples, links, or comments are greatly appreciated. Thank you in advance!
-Mat [import]uid: 70259 topic_id: 28620 reply_id: 328620[/import]