# Aaarggh yPos?

**URL:** <https://forum.kirupa.com/t/aaarggh-ypos/29396>\
**Category:** Uncategorized\
**Created:** [August 26, 2003, 12:22pm UTC](https://forum.kirupa.com/t/aaarggh-ypos/29396 "2003-08-26T12:22:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)\
**Post date:** [August 26, 2003, 12:22pm UTC](https://forum.kirupa.com/t/aaarggh-ypos/29396/1 "2003-08-26T12:22:12Z")

</div>

hI all,

I am stuck here. Trying to put .\_y on a mc.

[AS]

portfolioInfo = new XML ();  
portfolioInfo.ignoreWhite = true;  
//timeline = this;  
portfolioInfo.onLoad = function () {  
portfolioTag = this.firstChild;  
trace (count = portfolioTag.childNodes.length);  
for (child = 0; child \< count; child++) {  
currentClient = portfolioTag.childNodes[child];  
portfolioBtn = \_root.createEmptyMovieClip (“mc” + child, child);  
portfolioBtn.createTextField (“txt”, child + 1, 1, 1, 200, 35);  
portfolioBtn.txt.autoSize = true;  
portfolioBtn.txt.selectable = false;  
portfolioBtn.\_x = myRandom (0, 400);  
portfolioBtn.\_y = myRandom (0, 300);

```
	portfolioBtn.NAME = currentClient.attributes.NAME;
	trace (portfolioBtn.NAME);
	//show the corresponding name
	portfolioBtn.txt.text = portfolioBtn.NAME;
	//attach an background
	portfolioBtn.attachMovie ("txtBG", "txtBG" + child, 0);
	//_root.y = child * 20 + 60;
	yPos = child * 20 + 60;
	trace (yPos);
	//this.grow (50, yPos, 0.6);
	portfolioBtn.onEnterFrame = function () {
		this.grow (50, yPos, 0.6);

	}
}

```

};  
portfolioInfo.load (“portfolio.xml”);  
[/AS]

It’s the

```auto

yPos = child * 20 + 60;
		trace (yPos);
		//this.grow (50, yPos, 0.6);
		portfolioBtn.onEnterFrame = function () {
			this.grow (50, yPos, 0.6);

		}

```

part that gives me a “aargggh”. Some how the yPos is all the same, but the trace gives 3 different ones.

Any ideas

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 26, 2003, 12:49pm UTC](https://forum.kirupa.com/t/aaarggh-ypos/29396/2 "2003-08-26T12:49:27Z")

</div>

And with this it looking the way i want it but this is not dynamic

```auto

		mc0.onEnterFrame = function () {
			this.grow (50, 60, 0.2);
		}
			mc1.onEnterFrame = function () {
			this.grow (50, 80, 0.2);
		}
			mc2.onEnterFrame = function () {
			this.grow (50, 100, 0.2);
		}

```
