Professional Web Applications Themes

Waiting for enter key - Macromedia Director Basics

Hi guys, can anyone explain how to make a movie wait for for a certain key press. I want to make a section of my movie wait for a press of the enter key. Director provides a wait for keypress facility but does not let yo specify a key. Any ideas? Cheers Guys Dan...

  1. #1

    Default Waiting for enter key

    Hi guys,
    can anyone explain how to make a movie wait for for a certain key press.

    I want to make a section of my movie wait for a press of the enter key.
    Director provides a wait for keypress facility but does not let yo specify a
    key.

    Any ideas?

    Cheers Guys

    Dan


    Dan Dan the Magic Man Guest

  2. #2

    Default Re: Waiting for enter key

    this example is a copy/paste from my code.

    on keydown me
    MenuKeyboard(the keyPressed)
    end

    on MenuKeyboard(TheKPressed)
    case TheKPressed of
    --NEW
    "n","N","?","?":
    do your command


    otherwise
    beep
    end case
    end


    Vini


    coolvini Guest

  3. #3

    Default Re: Waiting for enter key

    Hi Dan,

    You can also try the script below to catch if the user has pressed the enter
    key:

    on keyDown
    if (the keyCode) = 36 then
    alert "Enter key has been pressed"
    end if
    end

    For more information about using the keyCode command, checkout the TechNote
    below:
    "How do I use KeyCode?"
    [url]http://www.macromedia.com/go/14590[/url]

    Hope this helps.

    Regards,

    Gren Foronda
    Macromedia Technical Support

    For more support options, please visit:
    [url]http://www.macromedia.com/support[/url]

    Gren Foronda Guest

  4. #4

    Default Re: Waiting for enter key

    Hi Dan,

    place this in a frame script where you want to wait:

    ---------
    on exitFrame me
    go to the frame
    end

    on keyDown me
    if (the key = RETURN) or (the key = ENTER) then
    go to the frame + 1
    end if
    end
    ---------

    this will not work during authoring, but it will work from a projector.

    --
    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

Similar Threads

  1. Waiting waiting waiting
    By Armadillo in forum Macromedia Freehand
    Replies: 0
    Last Post: September 6th, 08:29 AM
  2. DB2 is waiting for something
    By Klemens in forum IBM DB2
    Replies: 3
    Last Post: August 15th, 02:08 PM
  3. OT: Still waiting
    By John Johnson in forum Ruby
    Replies: 1
    Last Post: July 10th, 07:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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