# Extending a movieclip and calling a nested movieclip

**URL:** <https://forum.kirupa.com/t/extending-a-movieclip-and-calling-a-nested-movieclip/219983>\
**Category:** Uncategorized\
**Created:** [March 21, 2007, 6:14pm UTC](https://forum.kirupa.com/t/extending-a-movieclip-and-calling-a-nested-movieclip/219983 "2007-03-21T18:14:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ez74](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@ez74](https://forum.kirupa.com/u/ez74)\
**Post date:** [March 21, 2007, 6:14pm UTC](https://forum.kirupa.com/t/extending-a-movieclip-and-calling-a-nested-movieclip/219983/1 "2007-03-21T18:14:06Z")

</div>

Hi, I’m trying to do somthing like this:

[COLOR=Navy]class Timer extends MovieClip  
{  
// constructor  
function Timer()  
{  
[/COLOR][COLOR=Navy]this.onEnterFrame = CountDown;  
}

[/COLOR][COLOR=Navy] // CountDown  
[/COLOR][COLOR=Navy] function CountDown ()  
[/COLOR][COLOR=Navy] {  
[/COLOR][COLOR=Navy] this.mask\_mc.\_yscale–;  
[/COLOR][COLOR=Navy]}  
}[/COLOR]

And it won’t let me (There is no property with the name ‘mask\_mc’.)…

Alternatively, I try to do this:  
[COLOR=Navy]  
class Timer  
{  
[/COLOR][COLOR=Navy] var \_\_timer\_mc:MovieClip;

[/COLOR][COLOR=Navy] // constructor  
[/COLOR][COLOR=Navy]function Timer(timer\_mc)  
[/COLOR][COLOR=Navy] {  
[/COLOR][COLOR=Navy] \_\_timer\_mc = timer\_mc;  
[/COLOR][COLOR=Navy] this.\_\_timer\_mc.onEnterFrame = CountDown;  
[/COLOR][COLOR=Navy] }

[/COLOR][COLOR=Navy] // CountDown  
[/COLOR][COLOR=Navy] function CountDown ()  
[/COLOR][COLOR=Navy] {  
[/COLOR][COLOR=Navy] this.mask\_mc.\_yscale–;  
[/COLOR][COLOR=Navy] }  
}[/COLOR]

And it won’t work either…

So my question is:  
How can I call a nested MovieClip from inside an onEnterFrame method (which is declared in a class that extends a MovieClip)?

Thnx,  
EZ
