# Moving an external clip

**URL:** https://forum.kirupa.com/t/moving-an-external-clip/27759
**Category:** flash
**Created:** [August 6, 2003, 9:30am UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759 "2003-08-06T09:30:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Gilla](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@Gilla](https://forum.kirupa.com/u/Gilla)
#### Post date: [August 6, 2003, 9:30am UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759/1 "2003-08-06T09:30:51Z")

</div>

This is for flash MX.

I have a movie clip which I have loaded into a location, once it has loaded in I then want it to slide to a new location with friction. What Script would I need for that.

Sorry if its a bit vague, thanks in advance

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 6, 2003, 10:22am UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759/2 "2003-08-06T10:22:19Z")

</div>

what do you mean, movieclip loaded into a location?  
If you mean that using loadMovie you have loaded a swf into a MC, then you can just use easing motion on the movieclip, that should work,

onClipEvent(enterFrame){  
\_x+=(400-\_x)/5  
\_y+=(200-\_y)/5  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 6, 2003, 10:27am UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759/3 "2003-08-06T10:27:47Z")

</div>

Sorry it was a bit badly worded.

I have loaded a movieclip in using:

product.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“prod.swf”, “container”);  
container.\_x = 7 ;  
container.\_y = 80 ;  
}

When it comes in it’s hidden, which is what I want. I then want it to slide up which will make it look like it’s sliding up from behind the menu.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 6, 2003, 10:51am UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759/4 "2003-08-06T10:51:09Z")

</div>

product.onPress = function () {  
loadedmovie=true  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“prod.swf”, “container”);  
container.\_x = 7 ;  
container.\_y = 80 ;  
}  
\_root.onEnterFrame=function(){  
if(loadedmovie){  
container.\_x+=(400-\_x)/5  
container.\_x+=(400-\_y)/5  
}}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 6, 2003, 12:07pm UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759/5 "2003-08-06T12:07:12Z")

</div>

That’s fantastic, thank you very much.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 6, 2003, 1:31pm UTC](https://forum.kirupa.com/t/moving-an-external-clip/27759/6 "2003-08-06T13:31:46Z")

</div>

Ok I have this on and its working:

product.onPress = function() {  
loadedmovie = true;  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“prod.swf”, “container”);  
container.\_x = 7;  
container.\_y = 80;  
};  
\_root.onEnterFrame = function() {  
trace (container.\_y)  
if (loadedmovie) {  
container.\_x += (0-\_x)/5;  
container.\_y += (10-\_y)/5;  
}  
};  
But it wont stop or move upwards, I know the stop is missing but when I add it, it stops working, what am I doing wrong?
