Random Button Selection

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

  1. #1

    Default Random Button Selection

    I am creating a CDROM presentation using Director MX (Mac/PC delivery). This presentation has a couple of sections that have a number of buttons that can be clicked at random to access different topics. The problem I have is that I need to enable the enduser to click on the buttons in any random order, and have those buttons that have been clicked be grayed out and become inactive. Once ALL of the buttons have been clicked and the content displayed, the playhead needs to continue on to the next section. One of the areas where I need this is in a simple game. Once the game has been played I need to be able to reset the buttons if they choose to "Play Again".

    Does anyone have a solution for this? If you need more clarification let me know.

    Thanks


    Chip_Ster webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Random selection
      Hi You can use "select distinct names from table_name order by rand() limit 3". Hope this helps and let me know. cheers Binay -----...
    2. Print a selection with a button?
      I would like to print a section of a page with a button. Meaning I'd like the user to see a "Print" button on a table, click that button, then the...
    3. Random frame selection?
      I have just started using Director, so this is probably a simple/stupid question. Anyway, I am doing a short story in which the user can interact...
    4. Disconected Recordset & Random Selection
      Hello All, How would I go about using a disconnect recordset and select (x) records from it, x being the number of records to be selected. ...
    5. Button Selection
      Hi Troy , It seems that IE assumes the button to be the default button. When you presss "Enter", the page will be sumbitted by this button. If...
  3. #2

    Default Re: Random Button Selection

    Hey there,

    is this what you mean:
    [url]http://www.lingoprogrammer.co.uk/source_code/download/doClick.zip[/url]

    Andy K
    [url]http://www.lingoprogrammer.co.uk[/url]


    "Chip_Ster" <webforumsuser@macromedia.com> wrote in message
    news:blhmcc$jmv$1@forums.macromedia.com...
    > I am creating a CDROM presentation using Director MX (Mac/PC delivery).
    This presentation has a couple of sections that have a number of buttons
    that can be clicked at random to access different topics. The problem I have
    is that I need to enable the enduser to click on the buttons in any random
    order, and have those buttons that have been clicked be grayed out and
    become inactive. Once ALL of the buttons have been clicked and the content
    displayed, the playhead needs to continue on to the next section. One of the
    areas where I need this is in a simple game. Once the game has been played I
    need to be able to reset the buttons if they choose to "Play Again".
    >
    > Does anyone have a solution for this? If you need more clarification let
    me know.
    >
    > Thanks
    >
    >

    Andrew Kennedy Guest

  4. #3

    Default Re: Random Button Selection

    well you could try this

    property spn,counta
    on exitframe me
    spn=me.spritenum
    counta=0
    end

    on mouseup me
    counta=counta+1
    if counta<2 then
    --do what you want here
    end if
    end


    and for the greying out you may add this
    property spn,counta
    on exitframe me
    spn=me.spritenum
    counta=0
    end

    on mouseup me
    counta=counta+1
    if counta<2 then
    --do what you want here
    else
    sprite(spn).color=rgb(111,111,111)
    end if
    end


    but thats totally untested code though





    HAIRYBOBBY - why didn't I choose a really cool name like the vulcanpimp

    [url]http://www.geocities.com/hairybobby2000[/url]

    new vector shape behaviors here

    [url]http://www.geocities.com/hairybobby2000/vertexhome.html[/url]
    hairybobby webforumsuser@macromedia.com Guest

  5. #4

    Default Re: Random Button Selection

    Thanks to both of you for your responses. I have not had time yet to try these scripts, although I have taken the time to download and save them. I will let you know when I get to them and if they work for me.

    Thanks again

    Chet P


    Chip_Ster 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