4 Replies Latest reply on Aug 2, 2017 12:49 PM by philmodjunk

    Hiding objects question?

    tomperr

      I understand how to hide objects thru the inspector.  Is there a way to incorporate timing on hiding objects and loop them?

      For example unhide object 1 for 10 sec., then hide object 1 and unhide object 2 for 10 sec, then start over again.

      Thank you in advance.

        • 1. Re: Hiding objects question?
          TomHays

          You can make the hiding calculation of the object depend on a global script variable, i.e. $$HideObject01.

           

          Change the value of this variable in a script.  You will probably have to refresh the window.

           

          If the script isn't gong to be running constantly, you can use Install On Timer Script to set up the object visibility updating script.

           

          -Tom

          • 2. Re: Hiding objects question?
            philmodjunk

            Instead of refreshing the window, I'd refresh the layout objects using refresh object. That seems to have slightly better performance.

             

            Be aware that while the script is running you may be blocking the user from doing other things, thus a timer as has been suggested is likely a better option than a looping script.

             

            You might also see if an animated gif in a web viewer might be a better option if you can get that to work. Saw a really good demo of that several versions ago.

            • 3. Re: Hiding objects question?
              TomHays

              philmodjunk wrote:

               

              You might also see if an animated gif in a web viewer might be a better option if you can get that to work. 

               

              Agreed.

               

              If the hide/unhide content lends itself to being displayed in a WebViewer, you have many more options on animating and displaying.

               

              I have used HTML and JavaScript to change the page content in the WebViewer over time without needing to refresh the window/object.  This also avoids the need for scripting the hide/unhide and any window refresh redraw flashing.

               

              -Tom

              • 4. Re: Hiding objects question?
                philmodjunk

                Of course you won't have a window flash if you refresh the object rather than the window....