5 Replies Latest reply on Oct 23, 2011 2:47 PM by Sean_Wilson

    More D8 code that won't work in D11.5 - need more help?

    Professor S.

      Ok, I have made some progress, but am continuing to encounter code from working D8 apps that will not run in D11.5.  I have been able to fix some myself and others with the help others including Sean.


      Now, I am seeing that WIndows have been changed and communicating from a created MIAW back to the stage has also been changed.   I have been searching the online documentation for the last two hours, but cannot find any reference to tell the stage. I can see that this is gone and there is some new movie ("stage") references , but nothing that helps me tell the stage from a MIAW to go to a different move.  Can you please help me replace the non-working code marked below.  This is in a MIAW called tutor.dcr attached to a Next> button.  Wen I get to page 3 in tutor.dcr, I want the stage to goto tutorial1.dcr, but nothing happens:


          cursor 4

          tell the stage to cursor 4   - - this does not work

          tell the stage to gotoNetMovie (field "urlpath" & "tutorial1.dcr")  -- this does not work


      The documentation did not help me.  Maybe I am missing something.  Can you please tell me what code replaces the two D8 lines above that do not work in D11.5?






      I am getting closer (after two days of research now and searching everywhere for MIAW code examples, but still can't figure out how to tell stage)):

      (the stage). ?


      It would have been nice if Adobe had placed Tell in their new documentation and said its obsolete (not in _movie where I found it after five hours of searching) and then had placed some examples of how to replace your communicating between MIAW code. The examples in the new Using Director 11.5 are not helpful (to me).


      Now I found about 400 instances of Tell in just one of my eductional apps that need to be changed. I have been using D8 for 10 years. For anyone else who has to change their Tell commands here are some I figured out:


      Was:    set the windowType of window (field "urlpath" & "icauditprogramf05.dcr") to 0

      Had to change to:     window("icauditprogramf05.dir").type = #document

      Was:     tell window (field "urlpath" & "icauditprogramf05.dcr") to go to frame 4

      Had to change to:      window(field "urlpath" & "icauditprogramf05.dcr").movie.go(4)  -- I do not fully understand all te dot syntax yet and so it is surprising I figured this out!

        • 1. Re: More D8 code that won't work in D11.5 - need more help?
          Sean_Wilson Adobe Community Professional

          I'll assume your stage movie is named "stage" (which it will be unless you have explicitly changed it).

          It's difficult to know what context to refer to - if your field named "urlpath" is in the MIAW you might try:

          tFile = field "urlpath" & "tutorial1"
          -- reality check...
          put tFile

          If your named field is in the stage's castLib you might try:

          tFile = window("stage").movie.member("urlpath").text & "tutorial1"
          put tFile


          In either case I have no idea why you are using gotoNetMovie since you must be running as a projector if you are using MIAWs. Just because you have Shockwave compressed your movies doesn't mean you have to use plugin commands for navigation. Also note I have dropped the ".dcr" off the filenames - it is unnecessary (and limiting) to provide the file extension.

          1 person found this helpful
          • 2. Re: More D8 code that won't work in D11.5 - need more help?
            Professor S. Level 1

            Thanks Sean,


            When I try this:  window("stage").movie.go(tfile) I am getting a couple of errors:

            1. Director Player Error  Unable to find the "stage"!

            2. Then,  Script error  Frame not defined


            Before posting originally, I had tried the window("stage') and some possible other dot syntax but keep getting the same error (which I could not resolve originally).  I tried putting the windowlist and stage is not in there.  It is my main movie and at that point, I got stuck.  I tried (the stage), but couldn't get the cursor or the goto to work.  I did not change the stage movie name as you warned (at least I don't believe I did?)  Can you plase help me understand how to tell the stage without getting this error 1.


            On the second script error frame not defined, I am wondering if I need something to help the script know that the string "tutorial1" is a movie name not a frame name.If I only use one parameter in the go() won't it default to the frame name? Would something like (1, tfile) fix this or something else?


            Also, how do I tell the stage to cursor 4 from my tutor MIAW?  window("stage").movie.cursor(4) or something like that?

            • 3. Re: More D8 code that won't work in D11.5 - need more help?
              Sean_Wilson Adobe Community Professional

              What does your windowList report?


              The command should perhaps be window("name").movie.go(1, "filename")


              I can't imagine why your cursor isn't changing as expected.

              • 4. Re: More D8 code that won't work in D11.5 - need more help?
                Professor S. Level 1

                No problem!


                For some reason,window("stage") or window("name") will not work for me.  It's even in the Adobe documentation that way and so it "should.". When running theoffice.dcr with tutor.dcr in a MIAW and I put the window list, I only see window "tutor.dcr" . No stage or reference to anything else. To fix, I substituted:   (the stage). movie.go(1,tfile)   I was also able to tell the stage to change the cursor by substituting (the stage).movie.cursor(4)


                Well anyhow you suggestions were very helpful as usual and much appreciated and got me on the right path - thanks as always!


                Oh and one more wierd thing the Tell command which is supposedly obsolete and didn't work in one of my scripts is now working in three other places with

                tell the stage to gotoNetMovie (field "urlpath" & "tutorial1.dcr") .  So Tell may work or not work (just for your reference) and I can't explain why.

                • 5. Re: More D8 code that won't work in D11.5 - need more help?
                  Sean_Wilson Adobe Community Professional

                  It's probable your 'scriptExecutionStyle' property is 9 and not 10 - that would explain the syntax failure/s.