# Basic array property question

**URL:** <https://forum.kirupa.com/t/basic-array-property-question/141544>\
**Category:** Uncategorized\
**Created:** [March 21, 2005, 5:35am UTC](https://forum.kirupa.com/t/basic-array-property-question/141544 "2005-03-21T05:35:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nih](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nih](https://forum.kirupa.com/u/nih)\
**Post date:** [March 21, 2005, 5:35am UTC](https://forum.kirupa.com/t/basic-array-property-question/141544/1 "2005-03-21T05:35:34Z")

</div>

Can’t believe I got this far without working this out. 😉 Here’s my code:

```auto
class screensaver extends MovieClip {
	var vectx;
	var vecty;

```

That’s the snippet I used to open the class. Inside the class, I use:

```auto
function createShape(y) {
	this.vectx[y] = (Math.random() * 5) + 1;
	this.vecty[y] = (Math.random() * 5) + 1;
}

```

Y being an incremented count from a for() loop somewhere else in the class. Now. Why can’t I access the items of my array? When I try to trace them, they show as _undefined_. What am I doing wrong here?
