how to make quit button?

ervin0408

  • Posts: 9
guys ..
how to make a "quit button"
I want to close game after pressed Quit button ..

sdieters

  • Posts: 2068
Like i said on the FB page. It depends on what platform =)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

ervin0408

  • Posts: 9
platform ?? i used android  ..  do you know how to do it ? can u pls share on me... ! please .. :)

sdieters

  • Posts: 2068
add this in a custom code block >> nme.system.System.exit(1)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p


sdieters

  • Posts: 2068
nothing haha.
simply trigger an event when you press a certain actor and run this code
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

ervin0408

  • Posts: 9
ah ok maraming salamat :) imean thank you :P

sdieters

  • Posts: 2068
what language is that? =p
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

ervin0408

  • Posts: 9
i'll put it into the scene or on actor ?

ervin0408

  • Posts: 9
it's tagalog/Filipino language

sdieters

  • Posts: 2068
doesnt matter. but it would make more sense to place it on your exit button actor.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

ervin0408

  • Posts: 9
ah ok thank you very much sir ..

ervin0408

  • Posts: 9
sir .. how about .. if i used flash as platform .. what code will be use ?

sdieters

  • Posts: 2068
you cant close a flash game. only for android apps, and standalone games
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p