A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: This is Ridiculous!!!!

  1. #1
    Member
    Join Date
    Oct 2002
    Posts
    61

    This is Ridiculous!!!!

    For some reason or another the backspace and the delete keys don't work on the following function. But when I reassign the same function to a different key like the insert key it works perfect.

    on (release, keyPress "<Backspace>") {
    if (_root.calculator.display != "0") {
    disstr = new String(_root.calculator.display);
    if (disstr.length == 1) {
    _root.calculator.display = "0";
    } else {
    _root.calculator.display = disstr.substr(0, disstr.length-1);
    }
    }
    }

    What is up with these keys.

    Thanks
    I can always use more help!

  2. #2
    Senior Member FPChris's Avatar
    Join Date
    May 2003
    Location
    NJ
    Posts
    644
    on (release, keyPress "") {

    }

    this give me an invalid key as "" is not a legal value.

    Try...
    on (release, keyPress "< Backspace >")
    ...or...
    on (release, keyPress "< Delete > ")

    without the spaces

    Chris
    http://www.**********-dms.com

  3. #3
    Member
    Join Date
    Oct 2002
    Posts
    61
    When I copied it actually had "<backspace>" but for some reason that disappeared when I pasted it into my post. so it should have

    on (release, keyPress "<backspace>") {

    or

    on (release, keyPress "<delete>") {
    I can always use more help!

  4. #4
    Member
    Join Date
    Oct 2002
    Posts
    61
    Freaky Flashkit removes in between if you have "< backspace >" without the spaces. Why is this?

    that's how I had it "< backspace >" and or "< delete >" without the spaces
    Last edited by Calculator; 06-19-2003 at 12:43 AM.
    I can always use more help!

  5. #5
    Banned by GMF ™
    FK´s Banning Machine
    jerez_z's Avatar
    Join Date
    Jun 2001
    Location
    Calgary
    Posts
    235
    you could try using the key codes

    ie:
    Code:
    onEnterFrame {
        if(key.isDown(8)) {
            CODE HERE
        }
    }
    and the key code for delete is 46

  6. #6
    Member
    Join Date
    Oct 2002
    Posts
    61
    That's exactly how I have overcome it.

    But I wanted to know why it happened since in the original .fla that I modified it worked fine and then when I placed it into my .fla something happened to it and it's just the delete and backspace keys that don't work.

    All I want to know is why!

    Thanks for your help
    I can always use more help!

  7. #7
    Member
    Join Date
    Oct 2002
    Posts
    61
    Doesn't anybody know why!!!!
    I can always use more help!

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