Javascript referencing symbols
I have an HTML5 Animate app that I am developing that has a hierarchical movieclip/symbol structure, there is no timeline based animation, all animation is implemented by JavaScript.
I have JS functions on the first frame of the main timeline that need to access/use symbols that are embedded in a symbol. The problem I have is accessing the embedded symbols from within various functions/methods.
The only thing I can get working is something like:
function Something()
{
exportRoot.Symbol1.Symbol2.text = "replacement text";
}
To change the text of Symbol2
However I am aware that using exportRoot is not ideal. To me it's like accessing global variables from within a function.
I have tried:
function Something()
{
stage.Symbol1.Symbol2.text;
}
This doesn't work. (but stage.Symbol1 does access the first symbol!)
Is there a more elegant solution?
