# How do I reference MovieClips on the Main Timeline from inside a class?

**URL:** <https://forum.kirupa.com/t/how-do-i-reference-movieclips-on-the-main-timeline-from-inside-a-class/307268>\
**Category:** flash\
**Created:** [March 31, 2010, 3:03pm UTC](https://forum.kirupa.com/t/how-do-i-reference-movieclips-on-the-main-timeline-from-inside-a-class/307268 "2010-03-31T15:03:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Capt\_Zeroth](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Capt\_Zeroth](https://forum.kirupa.com/u/Capt_Zeroth)\
**Post date:** [March 31, 2010, 3:03pm UTC](https://forum.kirupa.com/t/how-do-i-reference-movieclips-on-the-main-timeline-from-inside-a-class/307268/1 "2010-03-31T15:03:28Z")

</div>

I’ve been programming with AS2 for a few years and I just made the switch to AS3. I’m hoping there is an easy solution to this problem.

I have a class ‘Actor’ (extends MovieClip) that needs to hitTestPoint on a nested MovieClip ‘root.World.walls’ in a function moveRight(). The line of code looks like this:  
…while (MovieClip(root).World.walls.hitTestPoint(pnt.x, pnt.y, true)) {…

But I keep getting various errors when I try different solutions.

Does anyone know a way to fix this?
