# \[FMX\]Help which code for load movie?

**URL:** <https://forum.kirupa.com/t/fmx-help-which-code-for-load-movie/117897>\
**Category:** Uncategorized\
**Created:** [July 31, 2004, 2:41pm UTC](https://forum.kirupa.com/t/fmx-help-which-code-for-load-movie/117897 "2004-07-31T14:41:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)\
**Post date:** [July 31, 2004, 2:41pm UTC](https://forum.kirupa.com/t/fmx-help-which-code-for-load-movie/117897/1 "2004-07-31T14:41:00Z")

</div>

I have a movie with two squares. Depending on which button is pressed, the demmensions of the both squares change for which I used the following function:

```auto
function scaleMoveClip(clip, breed, hoog, xpos, ypos, snelheid) {
clip.onEnterFrame = function() {
eindX = xpos-this._x;
this._x += eindX/snelheid;
eindY = ypos-this._y;
this._height += eindHoog/snelheid;
eindBreed = breed-this._width;
this._width += eindBreed/snelheid;
eindHoog = hoog-this._height;
this._height += eindHoog/snelheid;
if (Math.abs(eindBreed)<2 && Math.abs(eindHoog)<2) {
this._width = breed;
this._height = hoog;
delete this.onEnterFrame;
}
};
}

```

This is the code on button home:

```auto
btn_service.onPress = function() {
scaleMoveClip(mainVlak, 350, 350, 575, 325, 4);
scaleMoveClip(subVlak, 300, 350, 250, 325, 4);
};

```

and this is for example the code on button service:

```auto
btn_service.onPress = function() {
scaleMoveClip(mainVlak, 450, 450, 500, 325, 4);
scaleMoveClip(subVlak, 250, 450, 175, 325, 4);
};

```

The code for the other buttons is the same but with other arguments. Now do I also need to integrate a loadMovie in the different button actions, to load the different ext.swf’s in a container on the stage, but I only want the swf’s to load after the callback is finished (when the squares qre not moving any more) How does the loadMovie should look like?

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![Dodger](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@Dodger](https://forum.kirupa.com/u/Dodger)\
**Post date:** [August 1, 2004, 4:10am UTC](https://forum.kirupa.com/t/fmx-help-which-code-for-load-movie/117897/2 "2004-08-01T04:10:47Z")

</div>

Maybe you can do it with a setInterval :puzzle:

---

<div class="post-metadata">

**Author:** ![ratbaggy](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@ratbaggy](https://forum.kirupa.com/u/ratbaggy)\
**Post date:** [August 1, 2004, 4:25am UTC](https://forum.kirupa.com/t/fmx-help-which-code-for-load-movie/117897/3 "2004-08-01T04:25:06Z")

</div>

this should help

[http://kirupaforum.com/forums/showthread.php?t=51430&highlight=resize+fade](http://kirupaforum.com/forums/showthread.php?t=51430&highlight=resize+fade)

look at the code for the fade

---

<div class="post-metadata">

**Author:** ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)\
**Post date:** [August 1, 2004, 7:03am UTC](https://forum.kirupa.com/t/fmx-help-which-code-for-load-movie/117897/4 "2004-08-01T07:03:45Z")

</div>

Thanks a lot ratbaggy 🙂
