# Document Class Question

**URL:** <https://forum.kirupa.com/t/document-class-question/230339>\
**Category:** flash\
**Created:** [June 25, 2007, 2:29pm UTC](https://forum.kirupa.com/t/document-class-question/230339 "2007-06-25T14:29:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcampos](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@dcampos](https://forum.kirupa.com/u/dcampos)\
**Post date:** [June 25, 2007, 2:29pm UTC](https://forum.kirupa.com/t/document-class-question/230339/1 "2007-06-25T14:29:47Z")

</div>

Hello all,

I have a question about the document class and hopefully someone can explain why the first frame in my fla file is being called twice.

I have a class RS\_MovieClip; this class is just to extend functionality of the MovieClip class adding properties and methods I’m used to using.

```auto

public class RS_MovieClip extends MovieClip{
  //some properties and methods.
}

```

Now if I set the document class to RS\_MovieClip and set the Base Class of a MovieClip in the library to RS\_MovieClip.

![](http://dcampos.reflectionsoftware.net/post_images/docissuekiruppost.jpg)

Place an instance of “greenSquare” on the stage. Put a

```auto
trace("first frame");

```

on the first frame.

When I test movie I receive 2 traces.

Whats also really weird is that if I create a new symbol in the library exported as blueSquare, that just has a blue square in it. Then on the first frame put:

```auto
addChild(new blueSquare());

```

I get a blue square on the stage and in the greenSquare instance that is on the stage.

![](http://dcampos.reflectionsoftware.net/post_images/docissuekiruppost2.jpg)

If someone could explain to me why this is happening I would greatly appreciate it.

Thanks.
