# addElement problem?

**URL:** <https://forum.kirupa.com/t/addelement-problem/323046>\
**Category:** flash\
**Created:** [June 15, 2011, 7:32am UTC](https://forum.kirupa.com/t/addelement-problem/323046 "2011-06-15T07:32:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lnsiu](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@lnsiu](https://forum.kirupa.com/u/lnsiu)\
**Post date:** [June 15, 2011, 7:32am UTC](https://forum.kirupa.com/t/addelement-problem/323046/1 "2011-06-15T07:32:00Z")

</div>

Trying to kickstart in Flashbuilder and use a swc from a previous as3 project and see if the move will eventually lead to a better organized project, since flash has no clue what a project is codewise. However, I got stuck on the addElement method in my first class outside the Main.mxml.

I get this error: -Call to a possibly undefined method addElement

what can the problem be?

```auto
package
{
	import mx.core.UIComponent;
	
	import flash.display.MovieClip;
	

	public class initApp extends UIComponent
	{
		public function initApp()
		{
			startApp();
		}
		
		private function startApp():void
		{
			var container:UIComponent = new UIComponent();
			
			var mcinterface:MovieClip = new airInterface();
			container.addChild(mcinterface);
			
			//this.addChild(container);
			this.addElement(container);
		}
	}
}

```
