Could someone point me in the right direction (perhaps there are some pre-existing threads I may have failed to spot) to find out whether or not I can do the following?
What I need to do is 'set' a variable within a symbol's timeline and then 'get' it from the main timeline.
I have a symbol called 'audio' and on its timeline I have the code:
Then on the main timeline I have an 'onClick' which has the following code:
var audioStatus = sym.getVariable("on_off");
That doesn't seem to work; so I also tried:
var audioStatus = sym.getSymbol("audio").sym.getVariable("on_off");
But that doesn't work either.
Many thanks, in advance
You are very close!
If you set a variable on a symbol timeline, then you will have to get the symbol before you can get the variable - but you don't use sym twice in a line. So try this:
var audioStatus = sym.getSymbol("audio").getVariable("on_off");
Fantastic! Huge thanks, Joe, you're a star!