5 Replies Latest reply on Apr 9, 2009 12:23 PM by Ang-O

    Director 11 and Shockwave Asynch Issue

      Hi,

       

      I've been working in Director for a long time and back in 2004 I took a project, reworked it and was able to Shock it.

       

      I've got a similar project in Director 11 (basically an updated version of the old project) and I am trying to get that working in Shock.  It appears I'm having issues with the way handlers are run.

       

      I put a bunch of traces in the code to see what was happening and it appears that any code that calls other handlers never completes. In fact it appears that only the first handler will complete and then things sort of stop.

       

      The code works flawlessly as a projector.

       

      I'm trying ot figure out if I need handlerEventDone type coding (and am really hoping I don't) and if so, how would it be implemented. The same handlers are called from multiple places.

       

      Also, is this a Director/Shockwave 11 issue?

       

      Thanks!!

       

      Ang

        • 1. Re: Director 11 and Shockwave Asynch Issue
          James Newton, ACP Level 3

          Can you give us an idea of what code you are calling that never completes, and how you are calling it?

          • 2. Re: Director 11 and Shockwave Asynch Issue
            Level 1

            Hi James,

             

            I am running through an Exit Frame with a go to the frame command.

             

            I have a switch that calls this handler -- I've taken out irrelevant code

             

            on PTMode
              HighLightOptionOff
              member("cbtloc").append(return& "PTMode_start") -- This is used to tell me what has hit and what has not
              There is code here that runs fine. It sets some variables, but does not call any handlers.

             

              member("cbtloc").append(return& "PTMode_mid")
              If gDisplayMode contains "Something" then
                member("cbtloc").append(return& "PTModeDisplayOn")
                do "displayOn("&gDisplayMode&")"
                set gDoIt = "HighLight " & gDisplayMode
                do gDoIt
              else
                member("cbtloc").append(return& "PTMode_SwapmyOps")
                swapmyOpsScreen
              end if
              set gSwitchPosition = "PT"
              member("cbtloc").append(return& "PTMode_done")
            end PTMode

             

            When I run PTMode, the "PTMode_start", and "PTMode_mid" will show up, and the  "PTModeDisplayOn"  or  "PTMode_SwapmyOps"  will show up, but the code never reaches the end of either of those handlers (DisplayOn or swapmyOpsScreen).  I also never see the  "PTMode_done."

             

             

            DisplayOn and swapmyOpsScreen call other handlers, so I am guessing that in Shock, things just get very muddled and the program just stops processing code.  It doesn't seem to make the jump to a new handler from inside another handler.  However, it runs through a handler that does not call another handler without a problem. 

             

            I was having a hard time trying to parse five XML tables, but I was able to get that working using parseDone. My problem here is I have a lot of these handler-inside-handler situations and that type of coding would get really interesting.

             

            It works fine in projector mode.

             

            Thanks for responding - any leads are appreciated!!

             

            Ang

            • 3. Re: Director 11 and Shockwave Asynch Issue
              James Newton, ACP Level 3

              You are using "do".  If there is an error in the code that is triggered by the do command, then Director simply aborts the current call stack, and you get no feedback that this has happened.

               

              What happens if you change the lines...

               

                  do "displayOn("&gDisplayMode&")"
                  set gDoIt = "HighLight " & gDisplayMode
                  do gDoIt

               

              ... to:

               

                  displayOn(gDisplayMode)
                  HighLight gDisplayMode

               

              Do you encounter any script errors?

              • 4. Re: Director 11 and Shockwave Asynch Issue
                Level 1

                Hi again James,

                 

                it turns out that I'm actually dying out even before the PTMode.  I believe I am using an xtra (datetime.x32) which is bombing out. My code works fine up to that point.  I do have it marked as "Include in Projector." But it is definitely not working. It may not be shockwave safe.  I got it years ago.

                 

                I'll look into that. I don't see it on the web, but I'll try a work around and see what happens.

                 

                Thanks for your help.  You got me looking deeper into the code.  I'll let you know how I make out on this!!

                 

                Ang

                • 5. Re: Director 11 and Shockwave Asynch Issue
                  Level 1

                  The problem was the DateTime xtra.  It was old for one and it was not in the Shockwave Support Folder.  I downloaded the newest version which is designed for D11 (and is very nice!!!). I had no idea what a Shockwave Support Folder was, but I know now.  It's under C:\Documents and Settings\xxx\Application Data\Adobe\Shockwave Player 11\xtras.  The xxx is your username.

                   

                  What really got me was there was no indication of a failure in Shockwave. It just stopped chugging code, but was still operational. The Buttons still worked, etc.

                   

                  I hope this helps someone. And thanks again James, you got me started on the right track!!!

                   

                  Angelo