# Document class vs manual instance of the same class

**URL:** <https://forum.kirupa.com/t/document-class-vs-manual-instance-of-the-same-class/307581>\
**Category:** flash\
**Created:** [April 6, 2010, 10:08am UTC](https://forum.kirupa.com/t/document-class-vs-manual-instance-of-the-same-class/307581 "2010-04-06T10:08:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitree](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dimitree/32/2530_2.png) [@Dimitree](https://forum.kirupa.com/u/Dimitree)\
**Post date:** [April 6, 2010, 10:08am UTC](https://forum.kirupa.com/t/document-class-vs-manual-instance-of-the-same-class/307581/1 "2010-04-06T10:08:13Z")

</div>

Same class gives me different results when called from Properties panel(declared Document Class) than called manually.

I mean a have a class called Login and when I make an instance of this class

```php
var log:Login = new Login();

```

doesn’t give me the wanted results…

- When it is declared Document class it adds a child on stage
- When the same class is called manually (via the above code) although I get no errors nothing is added on stage.  
Any clue?
