Removing a character

Ask a Question related to Macromedia Director Basics, Design and Development.

  1. #1

    Default Removing a character

    Probably very easy, but I'm stumped!!

    I have this:

    on keyDown me
    legalCharacters = "abcdefghijklmnopqrstuvwxyz"
    if legalCharacters contains the key then
    put "*" after member "star"


    to create a * for each letter typed. How can I get member "star" to decrease the number of * if the user presses backspace?

    Morag




    Moggie webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Extract Character By Character in PDF
      Hi I have requirement to read the content of the PDF file. I achieved it using Adobe SDK and VB.NET. I used the GetJsObject, getPageNthWord and...
    2. InDesign ME Character Problem! Character-Change by Printing or saving *.PS!
      Hi everybody! I have some problems with ME Version. When i want to print a page with FARSI-Text in it, he changes one character! on screen he...
    3. Removing red eye
      I am following the "how to" instructions for removing red eye but the pupils now look an eery silver instead of the evil red. I selected default...
    4. Removing desktop icon from one account is removing from all accounts
      Using XP Professional. I want the Guest account to have only a few icons. The other two accounts should have many more. When I remove the icon...
    5. Removing XP
      Someone loaded Windows XP Professional onto my grandson's PC and we can't register it because we don't own it. He doesn't know who loaded it and...
  3. #2

    Default Re: Removing a character


    Make these few changes and you can use the backspace/delete key:
    > on keyDown me
    > legalCharacters = "abcdefghijklmnopqrstuvwxyz"
    thisManyChars = member("star").char.count
    if the keyCode = 51 and thisManyChars > 0 then
    member("star").char[thisManyChars].delete()
    end if
    > if legalCharacters contains the key then
    > put "*" after member "star"
    end if
    end

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

  4. #3

    Default Re: Removing a character

    <<
    on keyDown me
    legalCharacters = "abcdefghijklmnopqrstuvwxyz"
    if legalCharacters contains the key then
    put "*" after member "star"


    to create a * for each letter typed. How can I get member "star" to decrease the number of * if the user presses backspace?>>

    legalCharacters = "abcdefghijklmnopqrstuvwxyz"
    if legalCharacters contains the key then
    put "*" after member "star"
    else if charToNum(the key) = 8 then
    str = member("star").text
    delete the last char of str
    member("star").text = str
    end if

    Gretchen Macdowall
    updateStage, inc.
    Gretchen webforumsuser@macromedia.com Guest

  5. #4

    Default Re: Removing a character

    Thank you, Gretchen. It works perfectly.

    Morag


    Moggie webforumsuser@macromedia.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139