# Access parent variable/function?

**URL:** <https://forum.kirupa.com/t/access-parent-variable-function/224628>\
**Category:** flash\
**Created:** [May 3, 2007, 9:08pm UTC](https://forum.kirupa.com/t/access-parent-variable-function/224628 "2007-05-03T21:08:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltajam](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@deltajam](https://forum.kirupa.com/u/deltajam)\
**Post date:** [May 3, 2007, 9:08pm UTC](https://forum.kirupa.com/t/access-parent-variable-function/224628/1 "2007-05-03T21:08:53Z")

</div>

I’m stumped. I add clips from the library from my main Document Class. I can trace the parent from any of the clips attached classes.

But I can’t access the functions are variables inside the Document class. How do I do this?

if I want to access mainVariable from the Document class, how do I target that variable from the added clip?

trace(parent.mainVariable) gives me an error. Please help?
