Global Function

  • Adobe Edge Animate - April 19, 2016

A good place for your global functions would be to store them inside document.compositionReady

This small snippet shows you how to set up a global function and how to access it from anywhere.


Place the following inside document.compositionReady

sym.globalFunction = function(){
  // statements
}

To call this function from inside a symbol use:

sym.getComposition().getStage().globalFunction();

You can change the name globalFunction(); to your own function name.

Comments