3 Replies Latest reply on Jun 17, 2006 12:43 PM by alexandra42

    timeoutScript  and Javascript syntax

      Migrating from Flash and new to Director - I want to set up a splash screen - I know and like javascript syntax, I know lingo examples are out there.

      Given the dearth of documentation on timeoutScript - I have tried various permutations of the following to no avail.

      I am just running this from the authoring environment, in case that matters.

      function showSplash()
      {
      trace("showSplash()"); // I never see this!!!
      }
      function StartMovie()
      {
      trace ("Load Succeeded"); // Show up fine
      timeoutScript = "showSplash";
      timeoutLength = 60;
      }

      Any help would be appreciated.
        • 1. Re: timeoutScript  and Javascript syntax
          Level 7
          > function showSplash()
          > {
          > trace("showSplash()"); // I never see this!!!
          > }
          > function StartMovie()
          > {
          > trace ("Load Succeeded"); // Show up fine
          > timeoutScript = "showSplash";
          > timeoutLength = 60;
          > }
          >
          > Any help would be appreciated.

          It seems you're out of luck as these properties were perhaps not
          incorporated into the DOM - I tried the _system, _player and _movie
          objects as JavaScript and Lingo syntax and none work (or throw errors in
          the case of #lingo). They only work in a #lingo script when prepended
          with 'the' as below, but this throws errors in the SpiderMonkey engine
          when used with #javaScript syntax.
          Perhaps you can initialise this functionality in a #lingo script from
          your JS #startMovie handler:
          //#javaScript:
          function showSplash() {
          trace("showSplash()"); // I never see this!!!
          }

          function StartMovie() {
          mInitTimeout();
          trace ("Load Succeeded"); // Show up fine
          // _movie.timeoutLength = 60;
          // _movie.timeoutScript = "showSplash";
          }

          --#lingo:
          on mInitTimeout
          the timeoutLength = 60
          the timeoutScript = "showSplash"
          end
          1 person found this helpful
          • 2. Re: timeoutScript  and Javascript syntax
            Sean:

            Thank you very much.

            Works with two movie scripts as you suggested.

            Thought I was missing something obvious by not being able to address the timeoutScript.

            Thanks again,

            Tim

            ////////////////////////////////////////////////////////
            // First Movie script is in javascript
            //
            function showSplash()
            {
            trace("showSplash()");
            // ...this now works...
            }

            function StartMovie()
            {
            SetUpScreenSaverTimeout();
            }

            -- Second movie script is in lingo
            --
            on SetUpScreenSaverTimeout
            the timeoutLength = 60*5
            the timeoutScript = "showSplash"
            end
            • 3. Re: timeoutScript  and Javascript syntax
              alexandra42 Level 1
              Help ME!!!!!!!!!!!!!!!!!!!!!
              1 person found this helpful