Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 135144

Re: Edge/jQuery Function Scope: need advice

$
0
0

Joel,

Thank you for this. The code that addresses my problem deals with the getVariable and setVariable methods. I couldn't quite figure out that I could set variables at the Stage level.

 

This helped:

if (sym.getComposition().getStage().getVariable("xo") == "X") {

  sym.getComposition().getStage().setVariable("xo","O");

  sym.getComposition().getStage().setVariable("toggleColor","green");

} else {

  sym.getComposition().getStage().setVariable("xo","X");

  sym.getComposition().getStage().setVariable("toggleColor","red");

};

 

AND ALSO:

 

sym.$("Stage").css("margin", "auto");

 

I honestly didn't understand that $("Stage") was a possibility. I'll post my code when I'm done with the game example! Thanks again!


Viewing all articles
Browse latest Browse all 135144

Trending Articles



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