AS for moving movie clips

I just recently visited the site for j records @
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???

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 :slight_smile:

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

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.

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?

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

I actually wrote a tutorial on that too…


Thanks :slight_smile:

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.

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.

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

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?

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

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.

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:

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

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

*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!


:-\ 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…


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.


?? I don’t see anything wrong with it