# Extending classes question

**URL:** <https://forum.kirupa.com/t/extending-classes-question/315855>\
**Category:** Uncategorized\
**Created:** [November 5, 2010, 6:31pm UTC](https://forum.kirupa.com/t/extending-classes-question/315855 "2010-11-05T18:31:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarjoh](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@scarjoh](https://forum.kirupa.com/u/scarjoh)\
**Post date:** [November 5, 2010, 6:31pm UTC](https://forum.kirupa.com/t/extending-classes-question/315855/1 "2010-11-05T18:31:17Z")

</div>

i have a class A. it uses this code:

```auto
public function SideModule() {
           if (stage) {
    init();// stage accessible, call init function
   } else {
    addEventListener(Event.ADDED_TO_STAGE, init);// call init when stage accessible
   }
  }
   
  private function init(e:Event = null):void {
   if (e) {// called via event, remove it
    removeEventListener(Event.ADDED_TO_STAGE, init);
   }
   
   addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);

```

if i extends thsi class with class B (class B extends class A) how will i get this events in class B?  
do i have to register for them in class B as well?
