# Classes causing components to not work?

**URL:** <https://forum.kirupa.com/t/classes-causing-components-to-not-work/164931>\
**Category:** flash\
**Created:** [October 6, 2005, 2:55am UTC](https://forum.kirupa.com/t/classes-causing-components-to-not-work/164931 "2005-10-06T02:55:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoboLlama](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@RoboLlama](https://forum.kirupa.com/u/RoboLlama)\
**Post date:** [October 6, 2005, 2:55am UTC](https://forum.kirupa.com/t/classes-causing-components-to-not-work/164931/1 "2005-10-06T02:55:03Z")

</div>

Hi

I’ve made a custom class as a test, but when I instantiate it, it causes all the components in my movie to disappear.

Here is the class:

[//Style.as](https://Style.as)  
class Style  
{  
var id:Number  
function Style(id:Number)  
{  
this.id=id;  
}  
}

and when I instantiate it

[//styletest.fla](https://styletest.fla)  
var newStyle:Style = new Style(1);

It causes the components to disappear. Any idea of what could be causing this?
