15 Replies Latest reply on Jun 20, 2012 1:20 PM by Sean_Wilson

    MIAW crashes Win projector

    Peter S Price

      I have used Director 7 quite a bit, but am still learning Dir 11.5 as a newbie.

       

      I want to use a MIAW to show a "tutorial" window with buttons that control handlers in the main window. It works in the editing window, but when I run the projector (in Windows XP) it crashes as soon as I try to call the MIAW:

       

      on mouseUp me

        sWindow = window().new ("Script")

        sWindow.filename = "TeachScr"

        sWindow.open()

        put "Window should be open"

      end mouseUp

       

      I am wondering if I need another Xtra to handle MIAWs?

       

      Any help gratefully received - thanks.

        • 1. Re: MIAW crashes Win projector
          Peter S Price Level 1

          To be more precise:

           

          Earlier it was crashing, now this:

           

          When I run the main projector in Windows and try to open the miaw, I get a Windows dialog asking "Where is 'Script'?"

          • 2. Re: MIAW crashes Win projector
            Sean_Wilson Adobe Community Professional

            When you open the file with this code in it and execute

            put the scriptExecutionStyle

            from the Message Window, what does it report?

            • 4. Re: MIAW crashes Win projector
              murali_kumar Level 1

              Hi,

              Try this

               

              on mouseUp me

              if  _player.windowlist.getone(window("Script"))=0 then

                sWindow = window().new ("Script")

                sWindow.filename = "TeachScr"

              end if

                sWindow.open()

                put "Window should be open"

              end mouseUp

               

                                                                or

               

              on mouseUp me

                sWindow = window().new ("Script")

                sWindow.filename = "TeachScr"

                sWindow.open()

                put "Window should be open"

              end mouseUp

               

              on closewindow me

              window("window name").forget()

              end

              • 5. Re: MIAW crashes Win projector
                josh_chunick Level 1

                sWindow = window().new ("Script")  <-- this line seems to have a very minor problem... try removing the space between new and ("Script"). It's in the OP's code and in the responder's code. I haven't tested to see if the code works, but considering the error the OP was getting and I've never seen that exact syntax with the space before, I'd guess that was the problem.

                murali_kumar wrote:

                 

                Hi,

                Try this

                 

                on mouseUp me

                if  _player.windowlist.getone(window("Script"))=0 then

                  sWindow = window().new ("Script")

                  sWindow.filename = "TeachScr"

                end if

                  sWindow.open()

                  put "Window should be open"

                end mouseUp

                 

                                                                  or

                 

                on mouseUp me

                  sWindow = window().new ("Script")

                  sWindow.filename = "TeachScr"

                  sWindow.open()

                  put "Window should be open"

                end mouseUp

                 

                on closewindow me

                window("window name").forget()

                end

                • 6. Re: MIAW crashes Win projector
                  Production Monkey

                  I tried your code on my Windows XP SP3 box using D11.5.8 and it works fine. I don't know why you get an error.

                  • 7. Re: MIAW crashes Win projector
                    Peter S Price Level 1

                    Thanks, guys!

                     

                    Sadly, nothing has changed. I have added the extra code suggested by @murali_kumar and removed the space as @josh_chunick

                    said, but the response from Windows is the same: 'Where is "Script"?'

                     

                    Funnily enough, I get the same question when I click on another, unrelated button. I'll search around to see if I've put in some stray code.

                    • 8. Re: MIAW crashes Win projector
                      Peter S Price Level 1

                      OK, found the source of that specific error - newbie mistake.

                       

                      I had added "TeachScr.dir" as an 'Additional File', but not as a 'Dependent File'.

                       

                      So, now I don't get asked "Where is 'Script'?", but instead the projector crashes as soon as the miaw is called.

                      • 9. Re: MIAW crashes Win projector
                        Sean_Wilson Adobe Community Professional

                        So ... instead the projector crashes as soon as the miaw is called.

                        What happens when you run it in the authoring environment? Any error messages?

                        What does "crashes" mean? Vapourises without any feedback, or ... ?

                        • 10. Re: MIAW crashes Win projector
                          Peter S Price Level 1

                          In the authoring environment, it works fine. No error messages, just does what I want.

                           

                          Crash: the main "stage" window operates normally, as it did before I developed the MIAW. As soon as I execute the script to open the miaw, the extra window "flashes" ever so briefly on the screen, then both windows disappear immediately.

                          • 11. Re: MIAW crashes Win projector
                            Peter S Price Level 1

                            Thanks again for any help you can offer. This is doing my head in at the moment.

                             

                            I have had to move to a Windows 7 authoring environment, after Dir 11.5 stopped working on Win XP.

                             

                            In case the history can help someone work out what is going on:

                            1. In desperation I told Director I needed all the listed Xtras. After running the projector, I received an error message that a .dll was missing and that maybe "reinstalling the application" would correct this.
                            2. Accordingly, I reinstalled the trial version of Dir 11.5. After that whenever I try to start the program in Windows XP, I get an immediate "fatal error" message and the program never starts. I assume this might be the result of trying to reinstall the trial version, but I may be wrong.
                            3. I shifted to my laptop, which runs 32-bit Windows 7, installed the trial version again, then upgraded it to get access to projector production.
                            4. When I try to access the miaw from the main window, it now tells me that "TeachScr" is already opened by another user with write permission, so the program won't open it.
                            5. I tried closing the program and re-opening, restarting the computer, starting and closing the minor movie, no change.
                            6. I recreated the minor movie as "TeachScr2", changed the scripts and publish settings in the main movie accordingly.
                            7. Now, when accessing the miaw from within the authoring environment, it goes to close down Director, asking first if I want to save the main movie file. (This never happened in the XP environment.) If I click "Yes" or "No", Director closes completely. If I click "Cancel", I can then use the miaw, even with the main movie stopped.
                            8. Running the projector, whenever I try to open the miaw, it crashes immediately, as it did before.

                             

                            The miaw has just one text member, which contains hyperlinks to trigger code execution in the main movie, which was working fine in the authoring environment in XP. I've tried adding lots of Xtras, but it made no difference, as described above.

                            • 12. Re: MIAW crashes Win projector
                              Peter S Price Level 1

                              The code to open the miaw is the following:

                               

                              on mouseUp me

                                window().new("TeachScr2")

                                window("TeachScr2").open()

                              end mouseUp

                               

                              I tried executing the 2 lines of code in the  Message window.

                              • 'window().new("TeachScr2")' caused no change
                              • 'window("TeachScr2").open()' causes Director to put up the message:
                              • DirClose.jpg
                              • 13. Re: MIAW crashes Win projector
                                Sean_Wilson Adobe Community Professional

                                Would you like to send your files, as a zip archive, to sean (dot) n (dot) wilson (at) gmail (dot) com and I'll have a look and see if there's anything to be fixed.

                                • 14. Re: MIAW crashes Win projector
                                  Peter S Price Level 1

                                  I feel I should post two things here: the answer/s to my problems, and thanks to an outstanding person in this community.

                                   

                                  1.  So, Sean had a look at my files, and found (a) there was a #deactivateWindow handler lurking in a script which was suddenly closing the app when the window lost focus; (b) the scriptExecutionStyle was set to 9, causing a problem with naming a Window; and (c) inconveniently, I had forgotten to use "save and compact"

                                   

                                  2. I hope every regular here knows what an amazing person Sean is. I have never interacted with the guy until 3 days ago, and he generously checked out my files, found the problem and sent them back to me. I will be in his debt for quite a while. My customers will now have a neat feature to the app (a tutorial window containing text with hyperlinks to control what happens in the main window), adding value to what I offer them. Thanks again, Sean!

                                  • 15. Re: MIAW crashes Win projector
                                    Sean_Wilson Adobe Community Professional

                                    Your appreciation is humbling.

                                     

                                    I meant to add that you can use 'deactivateApplication' in place of 'deactivateWindow' if you need to react to the user Alt-Tabbing away from your program.