Could you post or send me (private message) a sample of your case (nested symbols)?
What's the best way to do that? Uploading a copy of the Edge Animate folder?
Okay, I've created a simpler scenario that presents the same challenge.
- Create an action on the Stage triggered by compositionReady. Put "sym.setVariable('myVar', 'myVal');" in there (or however you want to declare that variable).
- Drag out a rectangle on the Stage.
- Convert it to a symbol.
- Edit that symbol.
- Select the rectangle which is now within the symbol.
- Create a click action for it. Try to get the value of myVar from that action.
That's what I can't figure out how to do.
Okay, maybe I just needed to sleep on it, because this is working for me now.
In a compositionReady action on the Stage, declare the variable like this:
In the nested element's action, get the variable like this:
Don't know why that gave me so much trouble yesterday. I thought I tried that.
Does anybody know of some documentation that explains why things are set up the way they are? Why does EA have the setVarialbe() and getVariable methods, instead of just doing it like normal?
Thanks for taking the time to help, Joel!