2 Replies Latest reply on Jan 18, 2013 1:47 AM by Frannie@Cartoonfun

    Getting a variable from a symbol's timeline

    Frannie@Cartoonfun Level 1



      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:


      sym.setVariable("on_off", "on");


      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.


      Any ideas?


      Many thanks, in advance