Next and Back buttons
Warlock
Member Posts: 66
Hi guys,
I'm jamming hard on my first project. I'm working on an interactive book. I was wondering if someone could please tell me how to code a next and back button so people can turn pages. Any help is greatly appreciated. I hope to load some example pages soon:)
Warlock
I'm jamming hard on my first project. I'm working on an interactive book. I was wondering if someone could please tell me how to code a next and back button so people can turn pages. Any help is greatly appreciated. I hope to load some example pages soon:)
Warlock
Comments
`
Rule: When touch is pressed
--Change Scene to Scene.????
`
The Change Scene behavior gives you the following options I believe:
-Initial Scene
-Next
-Previous
-----------
-List of specific scenes by name.
http://gamesalad.com/wiki/behaviors_reference:change_scene
I have 3 actors.
Images
Forward
Backward
-----------------
Images:
If game.page = 0
change image to 0.png
otherwise
...
if game.page = 16
change image to 16.png
-----------------
Forward:
alpha = 0
if game.page < 16
change attribute self.color.alpha to 1
Actor receives touch pressed
change attribute game.page to game.page+1
otherwise
if attribute game.page = 16
change attribute self.color.alpha to 0
The back button the same, just into the other direction.
Welcome back hunn?
Still not really wanting back :-)
I just wanted to help, because it is simple and I already did it, so I thought, I don't let the poor man in the dark. :-)
It is not good for big books (many images) because you have to nest everything into eachother and with 16 pages it was already a horror :-)
Don't use it for too many pages.
Warlock