# Using variables to tell AS to edit an instance

**URL:** <https://forum.kirupa.com/t/using-variables-to-tell-as-to-edit-an-instance/189733>\
**Category:** Uncategorized\
**Created:** [June 5, 2006, 7:57pm UTC](https://forum.kirupa.com/t/using-variables-to-tell-as-to-edit-an-instance/189733 "2006-06-05T19:57:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlackBeltNinja](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blackbeltninja/32/1180_2.png) [@BlackBeltNinja](https://forum.kirupa.com/u/BlackBeltNinja)\
**Post date:** [June 5, 2006, 7:57pm UTC](https://forum.kirupa.com/t/using-variables-to-tell-as-to-edit-an-instance/189733/1 "2006-06-05T19:57:44Z")

</div>

Is there a way to have a function draw a box around an object by finding the objects instance name via a string?

such as:

```auto
function BoxObject(object) {
//code to draw a box around the object
}

```

and then juts have an object with an instance name, like “my\_mc” and then call the function on a keyframe like:

BoxObject(“my\_mc”);
