# Symbol Properties appearing "undefined"

**URL:** <https://forum.kirupa.com/t/symbol-properties-appearing-undefined/247274>\
**Category:** flash\
**Created:** [December 20, 2007, 2:42pm UTC](https://forum.kirupa.com/t/symbol-properties-appearing-undefined/247274 "2007-12-20T14:42:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonnyleeharris](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jonnyleeharris](https://forum.kirupa.com/u/jonnyleeharris)\
**Post date:** [December 20, 2007, 2:42pm UTC](https://forum.kirupa.com/t/symbol-properties-appearing-undefined/247274/1 "2007-12-20T14:42:43Z")

</div>

I’ve been using the contents of this forum a lot recently to help me progress with my recent project, and unfortunately I have to make my first post… asking for help. Not pretty, I know.

I have a function that gets passed an object (node), which has numerous properties, but the only ones we’re interested in are “node.ID” and “node.parentID”.

The function attaches a movie clip from the library like so, and sets it’s values.

```auto
_root.createEmptyMovieClip("container",0);

```

```auto
container.attachMovie("NodeGraphic",node.id,container_depth --); 
container[node.id]._x = whatever..
container[node.id]._y = whatever..  

```

The logic of the code means that children nodes are drawn AFTER parents, therefore if a node is seen as having a parent, we will then draw a linkage using the drawing API from the current nodes x and y co ords, to its parent nodes x and y co ords.

Both node.id and parent.id are in the same format, and here is how I _attempt_ to draw the line:

```auto
container.attachMovie("NodeGraphic",node.id,container_depth --);
container.createEmptyMovieClip(node.id+"parentLink",container_depth --);
container[node.id]._x = anything
container[node.id]._y = anything
 container[node.id+"parentLink"].lineStyle(1, 0x000000, 100);
container[node.id+"parentLink"].moveTo(container[node.id]._x, container[node.id]._y);
container[node.id+"parentLink"].lineTo(container[node.parentID]._x, container[node.parentID]._y);
trace(node.ID+" -- drawn");
trace(node.parentID);
trace(container[node.parentID]._x);

```

The problem is, the final trace (trace(container[node.parentID].\_x) returns an undefined value. However, if I trace the x value of the current node object (that I’m drawing), it _does_ appear. I’m guessing this is either a path issue that I don’t seem to have got my head around, or something to do with the movies not being attached properly (however, they do appear on my stage). Maybe the naming syntax I used in the attachMovie is incorrect? I’m using the value straight from the node.id property which is passed into the function via the node object.

What’s happening is I’m unable to draw the link between the nodes as I can’t see the value of the parent node’s x or y properties.

PS. When I CTRL+L during debugging… this is what I see:

```auto

Level #0: Frame=1
  Movie Clip: Frame=0 Target="_level0.container"
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=0 Target="_level0.container.undefinedparentLink"
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
    Movie Clip: Frame=1 Target="_level0.container.undefined"
      Shape:
  Movie Clip: Frame=0 Target="_level0.window"

```

Any help is greately appreciated, and I hope I’ve provided enough information for that to happen… if not, dont hesitate to ask me anything else :P.

Thanks!
