# Calling methods and properties of obj on the stage while inside a class

**URL:** <https://forum.kirupa.com/t/calling-methods-and-properties-of-obj-on-the-stage-while-inside-a-class/270760>\
**Category:** Uncategorized\
**Created:** [September 13, 2008, 5:39pm UTC](https://forum.kirupa.com/t/calling-methods-and-properties-of-obj-on-the-stage-while-inside-a-class/270760 "2008-09-13T17:39:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoink](https://avatars.discourse-cdn.com/v4/letter/z/9d8465/32.png) [@zoink](https://forum.kirupa.com/u/zoink)\
**Post date:** [September 13, 2008, 5:39pm UTC](https://forum.kirupa.com/t/calling-methods-and-properties-of-obj-on-the-stage-while-inside-a-class/270760/1 "2008-09-13T17:39:16Z")

</div>

How can a class that i made call an object in the main timeline? I know this sounds noobish but i can’t get it to work =(

I have a redContainer\_mc in my main timeline. Then in my code i have something like…

var redBall:MovieClip;  
redBall = new RedBall();  
redContainer\_mc.addChild(redBall);

I have a couple of questions…

1. In my RedBall.as, I trace this.parent.parent and the output is Main Time Line. Why can’t I do something like: trace(this.parent.parent.redContainer\_mc.height)? i get this error message:

1119: Access of possibly undefined property redContainer\_mc through a reference with static type flash.display:DisplayObjectContainer.

how can i call the properties and methods of redContainer\_mc inside my RedBall.as?

1. Btw, in my library, i have a symbol mcRedContainer, and redContainer\_mc is an instance of it. When i click the linkage, and export it for action script, and run my program… i get an error message:

1046: Type was not found or was not a compile-time constant: redContainer\_mc.

If i do not export it for action script, the program works fine… Why is this? And is this question related to my question above?
