# Error 1009, instantiating a class that extends a Sprite

**URL:** https://forum.kirupa.com/t/error-1009-instantiating-a-class-that-extends-a-sprite/287082
**Category:** Uncategorized
**Created:** [April 25, 2009, 8:01pm UTC](https://forum.kirupa.com/t/error-1009-instantiating-a-class-that-extends-a-sprite/287082 "2009-04-25T20:01:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spizer511](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@spizer511](https://forum.kirupa.com/u/spizer511)
#### Post date: [April 25, 2009, 8:01pm UTC](https://forum.kirupa.com/t/error-1009-instantiating-a-class-that-extends-a-sprite/287082/1 "2009-04-25T20:01:25Z")

</div>

Hi! I’m new… and yeah, any help would be greatly appreciated.

I’ve tried calling constructor class from my main.fla, and it just doesn’t work. The error when I try to instantiate the constructor is that it needs an argument… and since the class extends a Sprite… and I’m kinda at a loss. Help?

```php
	public function portGal():void {

			this._images = new Array();

			this._app.sWidth = stage.stageWidth;
			this._app.sHeight = stage.stageHeight;
			this._currentImageID = 2;

			var xmlURL:String;
			var xmlLoader:URLLoader = new URLLoader();

			xmlURL = "folioList.xml";
			xmlLoader.addEventListener(Event.COMPLETE, parseXML);
			xmlLoader.load(new URLRequest(xmlURL));
		}

```
