3 Replies Latest reply on Mar 7, 2014 6:14 PM by tymixxd

    How to prevent AN header/masthead from repeating? (reload, revisit, or other pages)

    tymixxd

      Howdy,

       

      I have an animation that I'm using for my website's header / masthead. If I navigate to other pages, I don't want the animation to run again (unless I hit a "replay" button that's part of the scene - which I've done).  Nor do I want it to run again if I return back to the homepage (as part of the same session - unless I click replay).  I just want a static image (basically my downlevel stage image)

       

      I know I could have two different animations, one would play automatically (on index.html) and one wouldn't (on all other pages).  Not an elegant solution.  HOWEVER, how do I NOT replay the animation when I "return" to index.html if I've navigated away from it?  I know next to nothing about .js or php, so a more detailed help would really be appreciated if that's part of the solution and you'd be so kind to assist.

       

      Thank you.  - ty

       

      Message was edited by: tymixxd

        • 1. Re: How to prevent AN header/masthead from repeating? (reload, revisit, or other pages)
          Sudeshnasarkar27 Adobe Employee

          Hi ,

           

          You can set a cookie on the user's machine and check that cookie each time the home Edge animate file loads. This variable can set at initialize and check that variable each time you show the home page.

           

          Helpful tutorial on setting and getting cookies(in Stage/CompositionReady event):

           

          http://www.w3schools.com/js/js_cookies.asp

           

          Other helpful forum posts :

           

          http://forums.adobe.com/message/6176653#6176653

          http://forums.adobe.com/message/5831745#583174

           

          Thanks and Regards,

          Sudeshna Sarkar

          1 person found this helpful
          • 2. Re: How to prevent AN header/masthead from repeating? (reload, revisit, or other pages)
            tymixxd Level 1

            Sudeshna (or anybody else),

             

            I thank you for the URL's.  I read the links you provided and using their sample code I believe I can cobble together a way to get & put a cookie.  However, how do I integrate it into Edge?  You mentioned the stage CompositionReady event, but I have no idea how to make my code work with these events.   I really hate to ask this, but I need further help.  As I pointed out, I don't know scripting languages (or modern high level languages for that matter).  Now if you wanted help with early 1970's COBOL or FORTRAN I may be of assistance. 

             

            Let's say that I have the functions to A) see if a cookie exists B) set a cookie and C) clear the cookie.  I'm guessing you'd want the functions to return true/false?

             

            So...how & where specifically would I integrate these functions into Edge actions/events?

             

            Here's about all I get at this point::

            At page load I'd want my javascript code within Edge to see if a cookie exists:

                 TRUE: do not run animation & display static (downstage) image

                 FALSE: set cookie true and run animation

            I'm guessing that as a set cookie parameter I'd have the cookie expire when exiting the session?

             

            Please, how do I get & set a cookie to activate the Edge actions?  Can you show me specifically how to integrate the appropriate Edge variables or symbos or events to use the cookie code?  Right now, this is beyond my primitive coding abilities.

             

            I hope you or someone would assist further with this.  Thank you so much.

            - ty

            I'm not a commercial web designer.  I'm do my small church's website as a "hobby".

            • 3. Re: How to prevent AN header/masthead from repeating? (reload, revisit, or other pages)
              tymixxd Level 1

              I've decided to do the javascript outside of Edge.  This way I have some idea how to do it right now and not depend upon others for their help - which I appreciate so far.  Thanks

              - by