This content has been marked as final. Show 6 replies
Every movieclip has a _root, but there is only one _level0 and that is the root of the swf that holds all other sfw's.
Are you saying I should change my code from _root.buttonChoice (etc) to _level0.buttonChoice (etc)?
I tried it, but no joy.
Okay, found the answer: I needed to use BOTH, eg:
_parent._root.buttonChoice = "skip_mc";
If skip_btn is on the child .swf, then I think you make a mistake when you wite:
_root.buttonChoice = "skip_mc";
because _root refer to the timeline of the parent .swf
Well, it's only a point of view...
I see what you're saying but clicking on the skip_btn (on the child timeline, as you correctly surmised) needs to assign values to variables (buttonChoice and movieChoice) that exist on the PARENT timeline, and call the function mainClick that also exists on the parent timeline.
Using both the _parent and _root properties managed to target these variables and functions correctly.
>>I tried it, but no joy.
>> I have a button (skip_btn) on the top level (root?) timeline of the child SWF
Yes, the button lives on the _root of the child swf
>>that needs to talk to variables and functions that sit on the root timeline of the parent SWF.
If that particular parent swf is the swf that loads all the childs then the code you need to call is on _level0 of the hierarchie.