# Referencing instance name w/variable in prototype call

**URL:** <https://forum.kirupa.com/t/referencing-instance-name-w-variable-in-prototype-call/149057>\
**Category:** flash\
**Created:** [May 25, 2005, 6:17pm UTC](https://forum.kirupa.com/t/referencing-instance-name-w-variable-in-prototype-call/149057 "2005-05-25T18:17:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustinM](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@JustinM](https://forum.kirupa.com/u/JustinM)\
**Post date:** [May 25, 2005, 6:17pm UTC](https://forum.kirupa.com/t/referencing-instance-name-w-variable-in-prototype-call/149057/1 "2005-05-25T18:17:13Z")

</div>

Hello all, I’m trying to reference an instance through the use of a variable in my call to a prototype. The variable is myVar and contains the instance name to which I want to apply the resizeTo prototype. My syntax is incorrect and I haven’t found any clues in my search. Any help is always appreciated. Thanks.

```auto

on(release){
	//disregard this line
	this.swapDepths(this._parent.getNextHighestDepth());
	//this is calling a prototype named resizeTo
	this.resizeTo(150, -100, -100);
	//Setting instance name of another movie 
	myVar = "green";
	//Trying to drop that instance name into my next prototype call
	this._parent.myVar.resizeTo(100, _parent.old_X, _parent.old_Y);
}

```
