5 Replies Latest reply on Dec 9, 2007 10:04 AM by Newsgroup_User


    MughalShahzad Level 1
      Regards for All,
      I am writing a Quiz program in Lingo. Student can sign in and then attempt a quiz. If student selects a wrong choice for the question, student will be informed and he can view the reference lesson (which is also written in director and a protected file) if he desires but can not reattempt the wrong question.
      My problem starts from here,
      Reference lesson which is created in director is opened in a window (MIAW). Following is the code to open this window:

      global vLsn
      global vMrk
      on hyperlinkClicked me
      open window(vLsn)
      window(vLsn).visible = FALSE
      tell window(vLsn)
      go to frame vMrk
      set the visible of sprite(6) to FALSE
      set the visible of sprite(144) to TRUE
      end tell
      window(vLsn).visible = TRUE

      Student can come back to attempt more questions.
      Code to come back to the quiz is as follows:

      on mouseDown me
      (the activeWindow).forget()

      every thing works fine but some times projector file corrupts unexpectedly

      1) Is there anything wrong in the above code
      2) Is there any other way to Open/Close the window
      if i use close() then student cannot open the lesson from lessons menu which was opened by the student previously while attempting the quiz it gives error message "the file is already open"
      3) Is there any other way to send information which is being sent to the reference lesson specially "marker name" and "locH"

      Quiz file and lesson files are (dsr) protected file while Quiz is launched from a Projector file

      My email is MughalShahzad@gmail.com I will send my source files to understand If some one can help me.

        • 1. Re: MIAW
          Level 7
          > (the activeWindow).forget()
          > every thing works fine but some times projector file corrupts unexpectedly

          I'm not sure what you mean by "corrupts unexpectedly", but I suspect you
          mean it crashes. This is probably because you are having the
          activeWindow forget itself - if you search the NG you will find more
          stable options (and a description of why what you are doing causes a crash)
          • 2. Re: MIAW
            MughalShahzad Level 1
            Yes you are right it crashes, okay now i will search about NG and try it.
            Thank you.
            • 3. Re: MIAW
              Team Alphie
              Hi I am just wondering if you have found a more stable solution to replace window,forget(). I am experiencing the same kind of problems, but I could not seem to find a solution.

              • 4. MIAW
                MughalShahzad Level 1
                My application is working fine problem starts when I write its exe and runs weather from HD or from CD
                • 5. Re: MIAW
                  Level 7
                  Create a parent script and paste the following into it:
                  -- script "window.closer.class"
                  property pWindow

                  on new me, aWindow
                  pWindow = aWindow
                  t = window("stage").movie.timeOut().new(string(me), -1, #mClose, me)

                  on mClose me, aTimer

                  Alter your mouseDown script (from the earlier code you posted) to:
                  on mouseDown me
                  script("window.closer.class").new(the activeWindow)