# Why Alert Component cannot use this.createObject

**URL:** <https://forum.kirupa.com/t/why-alert-component-cannot-use-this-createobject/324666>\
**Category:** flash\
**Created:** [September 2, 2011, 12:50am UTC](https://forum.kirupa.com/t/why-alert-component-cannot-use-this-createobject/324666 "2011-09-02T00:50:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan\_85](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@dan\_85](https://forum.kirupa.com/u/dan_85)\
**Post date:** [September 2, 2011, 12:50am UTC](https://forum.kirupa.com/t/why-alert-component-cannot-use-this-createobject/324666/1 "2011-09-02T00:50:04Z")

</div>

Hi everybody and very good morning,

I have confused about the Alert components. I wonder why the Alert component should be import using

```auto

import mx.controls.Alert;

```

but why I cannot use

```auto

this.createObject("Button","cbtSubmit",this.getNextHighestDepth())

```

the Button components can use that but why not Alert component?

Can anyone tell to explain?
