# If \_y =(value) then load movie---need help please!

**URL:** <https://forum.kirupa.com/t/if--y-value-then-load-movie-need-help-please/193954>\
**Category:** Uncategorized\
**Created:** [July 19, 2006, 3:52pm UTC](https://forum.kirupa.com/t/if--y-value-then-load-movie-need-help-please/193954 "2006-07-19T15:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![atebit](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@atebit](https://forum.kirupa.com/u/atebit)\
**Post date:** [July 19, 2006, 3:52pm UTC](https://forum.kirupa.com/t/if--y-value-then-load-movie-need-help-please/193954/1 "2006-07-19T15:52:32Z")

</div>

hello everyone…thanks for taking the time to read…here is my situation:

i have a shell that i am loading external swfs into…some of these external swfs are ratehr tall, so i pieced together a script that +/- the \_y value of the shell file to match the height of the loaded swf…however, while the flash player is scaling the shell _and_loading/playing the external swf at the same time, the flash player slows down pretty bad

so i am trying to figure out a way to append my script with some sort of statement where the player scales the shell, then once the \_y value has reached its goal, the loadMovie command is executed

here is my current script on the button instance:

```auto
on (release) {
    stageContainer.ease(405, 515);
    subnavLoader.attachMovie("subNav3", "subNav3_mc", 1);
    contentLoader.loadMovie("pages/3_0.swf");
}

```

and here is my scale script just in case:

here is the scale script in the first layer on the root:

```auto
MovieClip.prototype.ease = function(x, y) {
    this.onEnterFrame = function() {
        this._x = x-(x-this._x)/1.1;
        this._y = y-(y-this._y)/1.1;
        if (this._x>x-1 && this._x<x+1 && this._y>y-1 && this._y<y+1) {
            this._x = x;
            this._y = y;
            delete this.onEnterFrame;
        }
    };
};

```

any help is appreciated – thanks!
