# Why the components react so slow?

**URL:** <https://forum.kirupa.com/t/why-the-components-react-so-slow/279250>\
**Category:** flash\
**Created:** [January 12, 2009, 10:38am UTC](https://forum.kirupa.com/t/why-the-components-react-so-slow/279250 "2009-01-12T10:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangxiaorui](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zhangxiaorui](https://forum.kirupa.com/u/zhangxiaorui)\
**Post date:** [January 12, 2009, 10:38am UTC](https://forum.kirupa.com/t/why-the-components-react-so-slow/279250/1 "2009-01-12T10:38:30Z")

</div>

I met a very strange problem today, it’s about the “Button” component.

Well, I put a button on the stage and use

```auto
myButton.enabled = false;

```

but it doesn’t go disabled.

You have to “wait for some time” to make it work, or finally, I find using an ‘ADD\_TO\_STAGE’ event to solve it:

```auto
// The constructor of this sprite object
public function MySprite()
{
  super();
  myButton.enabled = false; // NEVER work, WHY ??
  this.addEventListener(EVENT.ADD_TO_STAGE, handler);
}

// a handler
function handler(){
  myButton.enabled = false; // work!
}

```

I am not sure whether this is the only solution if I have to use components from Flash CS3 …

Anyone knows why? and is my solution a reasonable one?

Thanks in advance.
