2 Replies Latest reply on May 10, 2017 12:46 AM by RoarkyGer

    Need a date switch that changes one graphic to another on a certain date

    RoarkyGer

      Has anyone got a script ready or an idea, how I can achieve this? I need to display a graphic and when a certain date is reached (MM/DD/YYYY), a different graphic replaces the old one.

        • 1. Re: Need a date switch that changes one graphic to another on a certain date
          resdesign Adobe Community Professional & MVP

          You could use the countdown code in order to achieve this and on the date you set add the code to change the image.

           

          See example here:

           

          change image on a date.zip - Box

           

          I used a script from javascriptkit.

           

          Look into the countdown symbol. the code in on the timeline.

          I set the date to be 5/10/2017 but you can change it.

          The code to adjust the date is at the bottom.

          The code to change the image too.

           

          You can hide the countdown symbol by placing it outside of your stage and set the stage to overflow hidden.

           

          I am sure there are other ways to do this. Of course for testing you need to run the comp and let it run until tomorrow to see the change.

          • 2. Re: Need a date switch that changes one graphic to another on a certain date
            RoarkyGer Level 1

            Thank you for your quick response!

             

            I don't really get the script to work: It only shows the blue present image and above is the text "Only -1 days, -10 hours, -43 minutes, and -24 seconds left until Image Changes!"

             

            If I change the date, it will only change the days, hours, minutes and seconds, but all the rest stays the same, the blue present is visible. I understand that I have to add a different "before" state image to the timeline, but how do I need to program the "if" and "else" command in order to toggle the images?