Please help me guys! I have 2 functions in a class. I need a code. I want to move to the second function after a button was clicked in the first function. They are in the same class. THANKS A LOT.
Not sure how you've defined your button - but in short you need to hook into the event that's generated when the button is pressed.
There are plenty of examples on the forum and in the gideros package that show you how to add a touch handler to a sprite to make it a button and then check to see if a press was registered within the bounds of the sprite, if it was then an event is usually generated alternatively this is the point when you should call the second function.
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Comments
There are plenty of examples on the forum and in the gideros package that show you how to add a touch handler to a sprite to make it a button and then check to see if a press was registered within the bounds of the sprite, if it was then an event is usually generated alternatively this is the point when you should call the second function.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
There are also other events available: http://docs.giderosmobile.com/reference/gideros/Sprite#Sprite