# Replace long object path with short var

**URL:** <https://forum.kirupa.com/t/replace-long-object-path-with-short-var/197398>\
**Category:** flash\
**Created:** [August 16, 2006, 1:35am UTC](https://forum.kirupa.com/t/replace-long-object-path-with-short-var/197398 "2006-08-16T01:35:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PCGamre](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@PCGamre](https://forum.kirupa.com/u/PCGamre)\
**Post date:** [August 16, 2006, 1:35am UTC](https://forum.kirupa.com/t/replace-long-object-path-with-short-var/197398/1 "2006-08-16T01:35:25Z")

</div>

How’s life?

This is what I would like to do. Change this:

```auto

this.onEnterFrame=function(){
  if (blaah){
    videoMC.vLoader.vContainer.holder.gotoAndStop(videoMC.vLoader.vContainer.holder._currentframe+2);
  }
}

```

to something simpler like this:

```auto

myVar = videoMC.vLoader.vContainer.holder
this.onEnterFrame=function(){
  if (blaah){
    myVar.gotoAndStop(myVar._currentframe+2);
  }
}

```

Is that possible, to substitute a long path with a short var. I know it can be done with any object property, but I’m not sure how to do it with a path, b/c what I’ve done so far doesn’t work.

Any help is appreciated.
