2 Replies Latest reply on Nov 28, 2012 7:16 AM by DMConsulting

    How to change a link according to timeline position?

    DMConsulting

      Hello everyone,

       

      i'm very new to javascript, and i am trying to make slideshow slides that each link to different URL's.

       

      This is usually very straightforward in edge, but my problem is that i also have a PNG wich "frames" the slides, and that PNG is positioned above the DIV's that hold the slides themselves. Therefore i cannot use the traditional "click" behaviour for the slides, because the PNG "hides" the clickable area.

       

      My idea was to place an invisible rectangle above the area that i want to be clickable, with a link that changes with the timeline.

       

      First:

      I created a click action (with no code in it) for the new clickable rectangle (div name= "click-box");

       

      Second:

      On the timeline, first frame, i wrote this code to assign the URL to the click:

       

      var BannerLink = sym.lookupSelector('click-box');

      $(BannerLink).append($('<a style="display:block;width:100%;height:100%;" href="http://WWW.EXAMPLE-URL-1.COM/" target="_blank" rel="nofollow" />'));

       

      Then on different frames of the time line i added the same code but with different URL's, like this:

       

      Frame10:

       

      var BannerLink = sym.lookupSelector('click-box');

      $(BannerLink).append($('<a style="display:block;width:100%;height:100%;" href="http://WWW.EXAMPLE-URL-2.COM/" target="_blank" rel="nofollow" />'));

       

       

      Frame 11:

       

      var BannerLink = sym.lookupSelector('click-box');

      $(BannerLink).append($('<a style="display:block;width:100%;height:100%;" href="http://WWW.EXAMPLE-URL-3.COM/" target="_blank" rel="nofollow" />'));

       

      It did not work.

      When running the edge composition, all the frames, when clicked, link only to the first link "www.EXAMPLE-URL-1.COM"

       

      So my code is wrong. Any ideas on how to do this?

       

      Thank you.

       

      Message was edited by: DMConsulting