A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: please help me to solve this...thank you

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    2

    Unhappy please help me to solve this...thank you

    i used the script below for softkeys...but it doesn't work...why?please help me...

    stop();
    _focusrect = false;

    fscommand2("SetSoftKeys","back","quit");
    fscommand2("Fullscreen", "true");

    var myListener:Object = new Object ();
    myListener.onKeyDown = function (){
    if (Key.getCode() == ExtendedKey.SOFT1){
    gotoAndStop ("menu",1);
    }
    else if (Key.getCode() == ExtendedKey.SOFT2){
    fscommand2 ("Quit");
    }
    };
    Key.addListener(myListener);

  2. #2
    Junior Member
    Join Date
    Mar 2009
    Posts
    8
    Hi,

    I have tried this code at first frame and its work.

    stop();
    _focusrect = false;
    fscommand2("SetSoftKeys", "back", "quit");
    fscommand2("Fullscreen", "true");
    var myListener:Object = new Object();
    myListener.onKeyDown = function() {
    if (Key.getCode() == ExtendedKey.SOFT1) {
    trace("done");
    } else if (Key.getCode() == ExtendedKey.SOFT2) {
    trace("quit");
    }
    };
    Key.addListener(myListener);

    Where are you placing your code ?

    Flash Guru
    http://www.flashknight.com

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    2
    hi flashguru...
    thank you...

    i'm place this code a the layer...

    for softkey1.
    it will go to other scene.
    thats why i used gotoAndStop ("menu",1);
    softkey2 is to quit.
    Last edited by shootsyuhada; 03-04-2009 at 08:27 AM.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center