2 Replies Latest reply on Feb 22, 2016 4:50 AM by NexxiomDood

    How to pull link into edge animation?

    NexxiomDood

      Hi,

       

      I'm generating a link with php.

      I need the link to be pulled into my animations.

      I cannot hardcode the link into the animation via edge animate because the link is always changing.

       

      Anyone have any ideas?

       

      Or if you know a way to wrap an embed html tag with an anchor tag, that would work too.

       

      Thanks,

       

      Nexx

        • 1. Re: How to pull link into edge animation?
          ddhayles Level 3

          Hi, firstly, if you are using php to generate the dynamic link then you will need to wrap your edge animate project inside another php document, you can do this with the code below:

           

          <?php

          include("dynamicLink.php"); // PHP File where your Dynamic link is generated

          include("edgeAnimateProject.html"); //EdgeAnimate HTML File

          ?>

           

          This wrapper will then need to pull in your php file that is generating the dynamic link. Inside this php file you can can turn the php variable of the dynamic link into a javascript variable using the following code.

           

          <?php $dynamicLink = "http://www.adobe.com"; ?>

          <script>

            var dynamicLink = <?php echo json_encode($dynamicLink); ?>;

          </script>

           

          If this dynamic link was then to be used on a button you would then add the following code to a click action in your EA project code window:

           

          window.open(dynamicLink, "_blank");

          • 2. Re: How to pull link into edge animation?
            NexxiomDood Level 1

            This is the most likely solution. however, my situation was a little more complicated but I did figure out a solution. Thanks!