×

Discussion Board

Results 1 to 3 of 3

Thread: Exit button

  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Albacete, Spain
    Posts
    380

    Exit button

    I am very new to Flash Lite (and Flash). Just learning the basics.

    I need to add an "Exit" button to my flash app. I have added the following code to exit the app when the button is pressed:

    Code:
    onMouseDown = function(){
        if(exitbut.hitTest(_xmouse, _ymouse, true)){
            trace("exit");
            exitbut.gotoAndPlay(10);
            fscommand("Quit");
        }
    }
    This works OK when play on the Flash player in Windows, but it does not work in the phone (tested on N97 and 5800).

    What would be a correct code to exit when the button is pressed?
    ----------------------------------------------
    Every journey starts with a small step.

  2. #2
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    100

    Re: Exit button

    You can simply follow the below steps:
    Create a button instance.
    Select that instance and write the following code on that(You should press F9 to open the Actions panel):
    on (release) {
    fscommand2("Quit");
    }

  3. #3
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    Re: Exit button

    Ciao,

    the fscommand2("Quit"); needs to be always in a button action: on (...) {....} or if you are using KeyListener same thing

    Alessandro

Similar Threads

  1. want to remove the exit button of my application
    By lokesh_kumar_s in forum Symbian
    Replies: 5
    Last Post: 2010-08-06, 18:18
  2. Replies: 9
    Last Post: 2007-12-05, 05:36
  3. Removing default exit button
    By jmdeveloper in forum Mobile Java General
    Replies: 9
    Last Post: 2006-11-07, 16:30
  4. Hide Default Exit Command Button
    By jaceline in forum Personal Profile
    Replies: 6
    Last Post: 2006-06-05, 03:18
  5. How Exit by pressing a button?
    By diluo in forum Symbian
    Replies: 2
    Last Post: 2005-09-06, 08:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×