5 Replies Latest reply on Sep 25, 2016 12:42 PM by Sean_Wilson

    Switching between MIAW

    sfPanzer Level 1

      Hello there,

      I got a problem and I just can't find a solution for it.


      My program consists of a main movie and when it starts a LogIn MIAW opens.

      The thing is that the main movie is supposed to fill some text boxes with informations he gets from a SQLite database based on the LogIn and I have no clue how to do that. I've put the function to full the textboxes in "on activateWindow" but I haven't seen a way to set the main movie to active once the LogIn MIAW is closed again without clicking on it manually.


      Is there maybe a better way to realize something like this? Help would be much appreciated.


      P.S. I'm using Director 11.5



        • 1. Re: Switching between MIAW
          Sean_Wilson Adobe Community Professional

          Without understanding your situation in detail, given the scenario you suggest I would approach it by validating the login in the MIAW, and calling a handler in the stage movie to populate data and close the MIAW.

          Something like:

          -- MIAW
          on closeWindow
            -- validate login, and if valid call a #movie handler in the stage
          -- stage
          on mPopulateData
            -- grab whatever from your DB and place it in text fields
            -- or however you wish to present it
            -- also, you can now (asynchronously) forget your MIAW
            t = timeout().new("forget MIAW", -1, #mForgetWindow)
          on mForgetWindow pad, timer
            if ilk(timer, #timeout) then timer.forget()
          • 2. Re: Switching between MIAW
            sfPanzer Level 1

            Ah didn't know you could call a handler of another movie like that. Neato.

            Unfortunately what's to get filled is a bunch of flash components so even tho I run a function to scale them before I open the LogIn MIAW he gives me the following error message as soon as I close the MIAW (Skriptfehler = script error):




            If there are any questions or details you need to find a solution I'll be happy to deliver.

            The weird thing is that the code right before it seems to work. Well actually they all worked before I tried to do the MIAW thing.


            sprite("lblTag1").locH = klocH + 25

            sprite("lblTag1").locV = klocV - 13

            sprite("lblTag2").locH = sprite("txtTag1W1").locH + kWidth + 23

            sprite("lblTag2").locV = klocV - 13




            • 3. Re: Switching between MIAW
              Sean_Wilson Adobe Community Professional

              And so if you open the debugger, what is the VOID value that Director expects to find is an object?

              • 4. Re: Switching between MIAW
                sfPanzer Level 1

                I fear I don't understand your question.

                • 5. Re: Switching between MIAW
                  Sean_Wilson Adobe Community Professional

                  One of the buttons presented on the dialog screen shot you posted says "Debuggen..." If you click that button it will show you the debugger window with a whole lot of useful information about the current situation. Mainly the call stack and the state of all the local and global variables. Open the debugger and take another screen shot and post it back if you struggle to understand what you see there.


                  When Director goes to execute the line of code posted in the error dialog it encounters a VOID value whereas it expects to find some sort of object. If you can use the debugger to understand which value is VOID you can hopefully progress your understanding of how to fix the error