Professional Web Applications Themes

Mystery to ME! - Macromedia Director Lingo

Update - I've narrowed the problem down some. go to label(gFinalExam[gFinal[1]])deleteAt gFinal, 1 I've removed all the if statements and am checking this code alone. It isn't working. gFinalExam is a list of 150 random numbers between 1 and 500. gFinal is a list of 150 random numbers between 1 and 150. The go to label - should give me one of the label numbers. Then delete one number out of the random 150 numbers from gFinal. Then when the user hits the next button, the will go to a different label. However, this isn't working at all now -...

  1. #1

    Default Re: Mystery to ME!

    Update - I've narrowed the problem down some.
    go to label(gFinalExam[gFinal[1]])deleteAt gFinal, 1

    I've removed all the if statements and
    am checking this code alone. It isn't working. gFinalExam is a list of 150
    random numbers between 1 and 500.
    gFinal is a list of 150 random numbers between 1 and 150.

    The go to label - should give me one of the label numbers. Then delete one
    number out of the random 150 numbers from gFinal.

    Then when the user hits the next button, the will go to a different label.
    However, this isn't working at all now -


    Tim A. Setliff Guest

  2. #2

    Default Re: Mystery to ME!

    These are the globals that are present with this script.
    global gNum, gAnswered, gCorrect, gTotalScore, gWrongList
    global gExam, gFinalExam, gFinal, gList
    Actually, the problem is with the go to label(gFinalExam[gFinal[1]] section.

    When I use the message window, the gFinalExam works, the gFinal works, the
    gFinalExam[gFinal[1]] works.

    If you would like to do a test for yourself.

    put gFinalExam
    -- [187, 557, 142, 124, 337, 716, 560, 731, 503, 513, 327, 644, 104, 102,
    262, 348, 29, 80, 642, 646, 56, 223, 299, 750, 721, 170, 628, 152, 278, 8,
    325, 688, 571, 135, 169, 113, 515, 521, 44, 123, 567, 499, 109, 569, 55,
    162, 136, 314, 2, 267, 481, 422, 115, 96, 185, 344, 568, 276, 59, 656, 701,
    194, 146, 141, 279, 86, 361, 402, 11, 30, 428, 23, 618, 778, 74, 613, 626,
    174, 705, 125, 709, 127, 272, 1, 128, 480, 576, 273, 386, 554, 191, 416,
    357, 597, 358, 592, 177, 542, 119, 148, 488, 453, 250, 32, 615, 270, 108,
    17, 769, 221, 239, 35, 697, 562, 24, 703, 72, 342, 770, 21, 711, 430, 578,
    154, 458, 289, 259, 508, 675, 766, 114, 616, 63, 575, 131, 639, 377, 16,
    175, 266, 13, 638, 555, 118, 42, 398, 304, 349, 376]


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

    put gFinalExam[gFinal[1]]
    -- 187

    By using the ( deleteAt gFinal, 1 ) the 2nd time that the next button is
    clicked, gFinalExam[gFinal[1]] would be 697.

    This has me stumped.

    Thanks for the help.

    Tim

    "next":
    if gAnswered = gNum then
    go to frame "total"
    else
    if gExam = 1 then
    go to label(gFinalExam[gFinal[1]])
    deleteAt gFinal, 1
    else
    go next
    end if
    end if



    "Rob Dillon" <robddg-designs.com> wrote in message
    news:250820030817519923%robddg-designs.com...
    > Since 3 doesn't equal 150, my only guess is that the values of
    > gAnswered and gNum are falling out in this function. Did you by any
    > change fail to declare these variables as global for this function? If
    > you did, then both would hold VOID and they would be equal.
    >
    > --
    > Rob
    > _______
    > Rob Dillon
    > Team Macromedia
    > [url]http://www.ddg-designs.com[/url]
    > 412-243-9119
    >
    > [url]http://www.macromedia.com/software/trial/[/url]

    Tim A. Setliff Guest

Similar Threads

  1. Here's a mystery
    By mdland55 in forum Macromedia Flash Player
    Replies: 0
    Last Post: February 22nd, 07:47 PM
  2. regexp mystery
    By John Davison in forum PERL Miscellaneous
    Replies: 8
    Last Post: August 25th, 10:29 PM
  3. The mystery deepens
    By Elliott-Fay webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 1
    Last Post: July 24th, 09:18 PM
  4. Mystery Error
    By Todd Plambeck in forum ASP.NET General
    Replies: 1
    Last Post: July 15th, 04:32 AM
  5. OS 9.0.2 mystery
    By Martin J. Kenny in forum Mac Networking
    Replies: 7
    Last Post: July 14th, 02:18 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