# Does a subclass's constructor automatically call it's superclass constructor?

**URL:** <https://forum.kirupa.com/t/does-a-subclasss-constructor-automatically-call-its-superclass-constructor/214453>\
**Category:** flash\
**Created:** [January 29, 2007, 5:51am UTC](https://forum.kirupa.com/t/does-a-subclasss-constructor-automatically-call-its-superclass-constructor/214453 "2007-01-29T05:51:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayman](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Ayman](https://forum.kirupa.com/u/Ayman)\
**Post date:** [January 29, 2007, 5:51am UTC](https://forum.kirupa.com/t/does-a-subclasss-constructor-automatically-call-its-superclass-constructor/214453/1 "2007-01-29T05:51:51Z")

</div>

Hi guys

I have 2 classes:

```auto
 
class Player{
 
 function Player()
 {
  super()
  directionStack = new DirectionStacker()
 } 
}

```

and

```auto
 
class DirectionStack extends Player{
 
 function DirectionStack()
 { }
 
}

```

does an infinite loop happen there? What I read in the Flash help (that comes with the software) is that you need to call super() if you want to call your superclass’s constructor. But in this code, am I automatically going to the superclass’s constructor? I’m getting this message:

> 256 levels of recursion were exceeded in one action list.  
> This is probably an infinite loop.  
> Further execution of actions has been disabled in this movie.
