# Newb: Simple Instatiate Question

**URL:** <https://forum.kirupa.com/t/newb-simple-instatiate-question/320213>\
**Category:** flash\
**Created:** [March 16, 2011, 8:42pm UTC](https://forum.kirupa.com/t/newb-simple-instatiate-question/320213 "2011-03-16T20:42:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Whittler](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@Whittler](https://forum.kirupa.com/u/Whittler)\
**Post date:** [March 16, 2011, 8:42pm UTC](https://forum.kirupa.com/t/newb-simple-instatiate-question/320213/1 "2011-03-16T20:42:44Z")

</div>

![](http://forum.kirupa.com/uploads/kirupa/525/d5236136df0858f4.gif) **Simple Instatiate Question**  
Regarding these declarations:

```
 ActionScript Code:
 [LEFT][COLOR=#993300]var[/COLOR] songList_XML:[COLOR=#993300]XML[/COLOR]; [COLOR=#993300]var[/COLOR] xmlLoader:URLLoader = [COLOR=#993300]new[/COLOR] URLLoader[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

[/LEFT]

I’m working off of the ASCS5 CIB book and ran across these statements an other like this. Why is it (or when is it) that when putting a class into a var with nothing in it, you have to preceded it with “new?” I think the term is called instantiate it? I’m having a problem understanding this logic. They’re both new. Why not:

```
 ActionScript Code:
 [LEFT][COLOR=#993300]var[/COLOR] songList_XML: [COLOR=#993300]new[/COLOR] = [COLOR=#993300]XML[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR]; [COLOR=#993300]var[/COLOR] xmlLoader:URLLoader = [COLOR=#993300]new[/COLOR] URLLoader[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

[/LEFT]

Is it because of the type of classes they are? If so, how do I know which ones to instantiate with the word “new” and which ones not to use “new.”

Thanks in advance,

Newb  
 ![](http://forum.kirupa.com/uploads/kirupa/525/d5236136df0858f4.gif)
