# Extending classes question

**URL:** <https://forum.kirupa.com/t/extending-classes-question/315854>\
**Category:** Uncategorized\
**Created:** [November 5, 2010, 6:29pm UTC](https://forum.kirupa.com/t/extending-classes-question/315854 "2010-11-05T18:29:10Z")\
**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:29pm UTC](https://forum.kirupa.com/t/extending-classes-question/315854/1 "2010-11-05T18:29:10Z")

</div>

i have class A.

it uses this code:

```auto
public function SideModule() {
      if (stage) {
    init();
   } else {
    addEventListener(Event.ADDED_TO_STAGE, init }
  }
   
  private function init(e:Event = null):void {
   if (e) removeEventListener(Event.ADDED_TO_STAGE, init);
 
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
 

```

so added to stage and removed from stage.

if i extend this class with class B (class B extends class A) how willi get this events in class B?

do i need to register from there as well?
