# Dynamic object increment variable creation

**URL:** <https://forum.kirupa.com/t/dynamic-object-increment-variable-creation/243173>\
**Category:** Uncategorized\
**Created:** [November 3, 2007, 8:43pm UTC](https://forum.kirupa.com/t/dynamic-object-increment-variable-creation/243173 "2007-11-03T20:43:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingscooty](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@kingscooty](https://forum.kirupa.com/u/kingscooty)\
**Post date:** [November 3, 2007, 8:43pm UTC](https://forum.kirupa.com/t/dynamic-object-increment-variable-creation/243173/1 "2007-11-03T20:43:53Z")

</div>

I’m still trying to get my head around the new techniques used in AS3 over AS2 _scratches head_

Ok, so i have a class called Node (filename: Node.as)… which basically assigns a few variables such as ID and description and places a movieclip from the library (node\_mc) on the stage with the stated x and y points.

[AS]  
var node:Node = new Node(1, new Point(400, 150), “this is a node”, this);  
[/AS]

What’s the best way to dynamically create a bunch of instances of object class Node?? With a number increment in the instance name? Something like node1, node2?

I plan to have the coordinates feed in from an xml file and then create however many nodes for the specified amount of coordinates within said file.

Cheers 😃
