4 Replies Latest reply on Mar 22, 2010 2:56 PM by sojourner146

    timeout error - what's going on?

    sojourner146 Level 1

      I have been trying to add collision detection to a personal learning project by adapting boundary management and camera-following scripts from Paul Catanese's book, Director's Third Dimension. My project has several cameras rather than just one, so I first made a mini-version with one camera using my assets and adapting his code. I got that to work well and learned quite a bit by playing with the parameters. However, when I tried to integrate his scripts into the main project I suddenly started getting an "object expected" error on the line, "timeout("drawspeed").new(42, #masterUpdate)". The script compiles but the error message comes up when the playhead gets to the "call initialization" script (the offending line is in the "initialization"script). I don't understand why it's suddenly a problem or what's going on. As I understand it, a timeout IS an object. Generally, it has reference parameters such as me or 0, or a specific script name, but I think Paul didn't need to use them in this case because the handler is called immediately in the same script and only once. If I do add "me" and "return me", the script fails to compile and I get a "variable used before assigned a value" error on the line.  Using "0" returns the "object expected" error. If I comment out this timeout and the associated lines, I get the same error on the next timeout.

       

      Nothing I've read or tried has given me a clue as to why this is not working and I would really appreciate some insight!

        • 1. Re: timeout error - what's going on?
          DAVID NAJAR

          Hi,

           

          Use "timeout().new("drawspeed",42, #masterUpdate)" may help.

           

           

           

          director_11.5_scripting manual:

           

          -- Lingo syntax when scriptExecutionStyle is set to 10

          x = timeout().new(name, period, handler, targetData)

           

           

           

           

           

          Have a nice day!

           

          DN

          • 2. Re: timeout error - what's going on?
            sojourner146 Level 1

            Thanks David!  I tried your suggestion and it seems to be working.  I say "seems" because now I have a whole host of other errors to deal with but they all seem to be of a familiar variety that I can deal with. The playhead has moved on and the movie started.

             

            I guess Director 11.5 has some syntax changes that make my old reference books unreliable.  That's bad news as I find most of the new documentation useless(circular definitions that give no clue as to when or how to use anything) and keep going back to Director MX 2004 Help for info and examples.  I hope Paul Catanese, Gary Rosenzweig, Phil and Michael Gross, or James Newton will come through with a comprehensive new reference soon.  Thank you as well for the heads up on the changes; at least I will now know to look for them when something strange happens.

             

            Sue

            • 3. Re: timeout error - what's going on?
              Mike Blaustein Level 4

              Interestingly enough, the timeout lingo changed between Director 9 and 10.  The docs in Director 10 did not get updated, so they were wrong.  I am not sure if they bothered updating them for D11, so they still may be wrong... I don't know.  But there is a very good writeup at DOUG with all the info you need about both the old and new syntax:

               

              http://www.director-online.com/dougwiki/index.php?title=TimeOut

               

              Also, the lingo for MIAWs changed at the same time, so if you are having trouble with them, that would be the problem.

              1 person found this helpful
              • 4. Re: timeout error - what's going on?
                sojourner146 Level 1

                Thanks Mike,

                 

                I guess I'm the one behind the times.  Venturing into timeout territory is a whole new thing for me.  Most of the really helpful books on Director 3D seem to be from 8.5 but up until now that hasn't been a problem.  Thank you for the link to DOUG. I haven't tried any MIAWs with 11.5 yet but had been considering using them in another project.

                 

                I've begun to get curious about Physics and the MultiUser Server.  The Physics section in the 11.5 Help Section is utterly useless if you don't already know how to use Physics. Since It's a brand new engine and there's no partner company providing documentation and examples, that makes the whole thing pretty useless.  It doesn't seem likely that learning how to use Havok or Aegia would be of much benefit for a newbie trying to make it work.  I'm an artist, not a programer, so I'm only guessing at what the terms mean in a Lingo context and haven't the foggiest how to use them to make something happen.  I thought Adobe had posted some articles about using Physics when 11 came out but couldn't locate them last night. Can anyone recommend a good reference for a beginner to learn how to use the new engine?

                 

                I can't tell from what I read what the uses of the Flash server that seems to have repaced the MultiUser Server are - can two people in different places still play games together with it or is it only for posting videos?  Does the old server still work?  From what I've read the Flash server doesn't seem to have nearly the same capabilities that the old Director one did but that may be just my misunderstanding of things about which I know very little.  Director seems like a marvelous toxbox to me but it can be frustrating.

                 

                Sue