# AS for moving movie clips

**URL:** https://forum.kirupa.com/t/as-for-moving-movie-clips/6297
**Category:** flash
**Created:** [October 3, 2002, 4:38pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297 "2002-10-03T16:38:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Amiridon](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amiridon](https://forum.kirupa.com/u/Amiridon)
#### Post date: [October 3, 2002, 4:38pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/1 "2002-10-03T16:38:33Z")

</div>

I just recently visited the site for j records @ [jrecords.com](http://jrecords.com)  
If you noticed everytime you click a button two of the MC’s go to designated points from where everthey where previous

Would anyone be able to figure this code out???

---

<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: [October 3, 2002, 4:41pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/2 "2002-10-03T16:41:36Z")

</div>

Read my tutorial on easing on mouse click. This will give you the basic idea. Just change it to only work on the \_x axis and instead of clicking on the root, apply the actions to a button 🙂

[http://www.kirupa.com/developer/mx/easing\_mouseclick.asp](http://www.kirupa.com/developer/mx/easing_mouseclick.asp)

---

<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: [October 3, 2002, 4:57pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/3 "2002-10-03T16:57:12Z")

</div>

Oh I’m sorry I didn’t explain myself fully. Within the movie there are two MC’s  
1 that show video’s with a scroll bar to view different artists videos

and  
2. an email submit input field with a submit button.

Whenever you click a button these two movie clips first clear the present contents, and you’re see the boxes move to different locations, depending on whichever button you press.

the middle box is always and simple tween.

---

<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: [October 3, 2002, 5:02pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/4 "2002-10-03T17:02:21Z")

</div>

Oh yes, I did not notice that…

Hmmm how to explain. There are a couple ways this could be done…

What do you know thus far about AS motion?

---

<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: [October 3, 2002, 5:10pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/5 "2002-10-03T17:10:05Z")

</div>

nice tutorial, how would you get a mouse move easing?

---

<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: [October 3, 2002, 5:11pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/6 "2002-10-03T17:11:03Z")

</div>

I actually wrote a tutorial on that too…

[http://www.kirupa.com/developer/mx/followease.asp](http://www.kirupa.com/developer/mx/followease.asp)

---

<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: [October 3, 2002, 5:23pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/7 "2002-10-03T17:23:23Z")

</div>

great!

---

<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: [October 3, 2002, 5:31pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/8 "2002-10-03T17:31:38Z")

</div>

Thanks 🙂

---

<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: [October 3, 2002, 5:44pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/9 "2002-10-03T17:44:39Z")

</div>

Most of the AS I do I’m most likely cut and pasting from a tutorial and adjusting it a little to go with my movie.

I know the easing tutorial would probably work for this but how would you go about make the MC ease to a location instead of the mouse location.

---

<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: [October 3, 2002, 5:48pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/10 "2002-10-03T17:48:47Z")

</div>

Hmm, I can’t think of how to explain it…

I am going to be leaving soon, and I won’t be back until later tonight so hopefully someone else here can answer. If not I will see what I can do when I get back.

---

<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: [October 3, 2002, 6:25pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/11 "2002-10-03T18:25:19Z")

</div>

LOL dayum, feels like Im in line at the motor vehicle.

---

<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: [October 4, 2002, 1:55am UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/12 "2002-10-04T01:55:35Z")

</div>

Would you be able to replace the mouse click line(AS line which tells the MC to react to a mouse click) with an x/y coordinate instead. Would that work?

---

<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: [October 4, 2002, 2:04am UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/13 "2002-10-04T02:04:24Z")

</div>

heh those are great tutorials… i always thought that easing motion like that would be so much more complicated… thats great… i think im going to use that all the time now since i know how easy it is

---

<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: [October 4, 2002, 3:20am UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/14 "2002-10-04T03:20:13Z")

</div>

Hey Amiridon, probably about 1000 ways of optimizing this, but here is an example .fla file that you may be able to put to use.

I hope it helps:)

Oh yeah, and thanks for liking my tutorials:) Easing is Easy…haha.

---

<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: [October 4, 2002, 4:38pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/15 "2002-10-04T16:38:07Z")

</div>

Hey guys. The thing you have to understand is that you ease to a point. Whether it is the mouse, a movie clip location or I don’t know what else, IT IS THE SAME FORMULA!!

pom :asian:

---

<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: [October 4, 2002, 4:48pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/16 "2002-10-04T16:48:08Z")

</div>

Yes, it is the same formula. And despite how difficult easing seems, the forumla is a simple…

```auto
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;

```

---

<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: [October 8, 2002, 12:20am UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/17 "2002-10-08T00:20:03Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*Hey Amiridon, probably about 1000 ways of optimizing this, but here is an example .fla file that you may be able to put to use.  
> \*\*

Hello lostinbeta! Can you please give me an example of your tut in flash 5? I am currently using Flash MX but for backward compatibility I have to export my SWFs in FLash 5 format!

Thanks

---

<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: [October 8, 2002, 1:59am UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/18 "2002-10-08T01:59:05Z")

</div>

:-\ I have no way to convert them to Flash 5. You can use the same code in Flash 5 so all you would really have to do is rebuild in Flash 5 and you are set.

Just for quick reference… you can find the tutes here…

[http://www.kirupa.com/developer/mx/followease.asp](http://www.kirupa.com/developer/mx/followease.asp)

[http://www.kirupa.com/developer/mx/easing\_mouseclick.asp](http://www.kirupa.com/developer/mx/easing_mouseclick.asp)

---

<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: [October 8, 2002, 9:04am UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/19 "2002-10-08T09:04:32Z")

</div>

Thanks!

I have done some changes to the script and came up with a version for flash 5. The problem now is that when I clicked the button the clip follows until its \_x and \_y are the same as that of the button clicked but not exactly! the movie clip doesn’t really coincide with the \_x and \_y of the bottun being clicked. Here is the FLA.

Please help thanks.

comicGeek

---

<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: [October 8, 2002, 4:24pm UTC](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297/20 "2002-10-08T16:24:57Z")

</div>

?? I don’t see anything wrong with it

[Next page](https://forum.kirupa.com/t/as-for-moving-movie-clips/6297.md?page=2)
