Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

How can I use a custom js file to specify link destinations?

$
0
0

If I use a rectangle to create a button (name "ExitRight"), I specify the button action in a click script. So, to go to a web page using the click script, I enter:

 

window.location= " window.location="https://www.google.com/";

 

This works fine and if I look in the edgeAction.js file I find:

 

//Edge symbol: 'engine_anim'

   (function(symbolName) {  

      Symbol.bindElementAction(compId, symbolName, "${_ExitRight}", "click", function(sym, e) {

         // insert code for mouse click here

         window.location="https://www.google.com/";

      });

      //Edge binding end

   })("mySymbol");

   //Edge symbol end

 

Now, what I really want to do is be able to change the destination the button takes me to by using a global variable to specify the destination:

something like...

window location = myDestination;

...where myDestination is a global created in  an external custom js document loaded in to the script library

 

Just putting...

myDestination = "https://www.google.com/";

...into the external js doc doesn't work. So how can I accomplish this?

 

Peter Small


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>