# ADDED\_TO\_STAGE in keyframe as?

**URL:** <https://forum.kirupa.com/t/added-to-stage-in-keyframe-as/293740>\
**Category:** flash\
**Created:** [August 3, 2009, 12:28am UTC](https://forum.kirupa.com/t/added-to-stage-in-keyframe-as/293740 "2009-08-03T00:28:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickjv](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@patrickjv](https://forum.kirupa.com/u/patrickjv)\
**Post date:** [August 3, 2009, 12:28am UTC](https://forum.kirupa.com/t/added-to-stage-in-keyframe-as/293740/1 "2009-08-03T00:28:26Z")

</div>

This is really weird. I have 2 MC’s in Library, “mc” and “mc2”. Both are added in main timeline with

```auto
 
var aaa = new mc();
addChild(aaa)
var bbb = new mc2();
addChild(bbb)

```

“mc” has keyframe script and “mc2” a .as class file

“mc”

```auto
this.addEventListener(Event.ADDED_TO_STAGE,startall);
function startall(e:Event):void{
 trace("yes")
}

```

“mc2”

```auto
 
package {
 import flash.display.Sprite;
 import flash.events.Event;
 public class mc2 extends Sprite{
  public function mc2() {
   addEventListener(Event.ADDED_TO_STAGE,startall);
  }
  //---------------------------------
  public function startall(Evt:Event):void{
   trace("yes2")
  }
 }
}

```

Now the weird part; “mc2” traces ‘yes2’ but “mc” does not trace. Anybody any clue, principle is the same with difference that one is in .as and other in keyframe.

Did I oversee something?
