How can you make a text on an image clickable ?
Hi , I made an menu overlay , and i typed the options of the menu ( play , settings ) etc , How can i make when u press the button play , it goes to the another scene ? ( Make it touchable )
Thanks a lot
Thanks a lot
Best Answers
-
FluxGames Posts: 33
First create a rule from the behavior menu. In that rule: When touch is pressed.... And then you drag the Change scene behavior from the behavior menu into that rule.
//MJ -
FluxGames Posts: 33
Then you have to make an actor, drag the actor into the sceen and double click it. Now drag your PS into the actor and last, do as i said above. Hope it helps.
//MJ -
simo103 Posts: 1,331
@tspad10 .. I'm assuming that your image is full screen with Play etc on it. You have two choices. Make a Play button image alone and put your change scene behavour in that OR make an invisible actor in GS and size it over the Play part and put your If touch is pressed change scene behaviour in that. -
simo103 Posts: 1,331
@tspad10 ... I should probably have also said that I would recommend the first suggestion (ie: make a background actor ie: full scene photoshop image, and then create your buttons (ie: the Play one) as separate images/actors. Why? Well I believe it is helpful and more professional to provide your customer with clues that an action has occurred so I would use a visual and a sound in a button. In your PLAY button you could have if touch is pressed Interpolate self.size.width to (a number about 20% bigger than normal). Do same for height. Also add a Play sound attribute and find a click sound you like somewhere. Then add a timer After 0.3 seconds change scene.
Important: put Interpolate self.size width and height attributes in the Otherwise part of that rule and set their values at the true size of your button.
Result: your button will expand under your touch, make a click sound and then resize to normal once you raise your touch, then the scene will change. (Alternatives are to do a change image instead of size)
Answers
//MJ