Xy positioning of movieclip-button

hey guys & girls,
I’ve gotta questions. I want to realize a button that is inside a movieclip, which traces the mousetrail. When the user clicks on the button, the movieclip goes to a certain location where it stays…
my as knowledge is poor, and I just can’t get out how these guys do it: http://www.wireframe.co.za/w1r3d.html

thanks for the hints you can give me !

chris

[AS]stop();
speed = 50;
onEnterFrame = function () {
endX = _root._xmouse;
endY = _root._ymouse;
yourMC._x += (endX-yourMC._x)/speed;
yourMC._y += (endY-yourMC._y)/speed;
};
[/AS]

try this for the mouse trail

[AS]
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
//
speed = 50;
onEnterFrame = function () {
endX = _root._xmouse;
endY = _root._ymouse;
yourMC._x += (endX-yourMC._x)/speed;
yourMC._y += (endY-yourMC._y)/speed;
};
//
yourMC.onRelease = function() {
var tweenx:Tween = new Tween(yourMC, “_x”, Strong.easeInOut, yourMC._x, 100, 2, true);
var tweeny:Tween = new Tween(yourMC, “_y”, Strong.easeInOut, yourMC._y, 100, 2, true);
delete _root.onEnterFrame;
};
[/AS]

that will do if you apply it on _root with a mc with instance name yourMC
hope that helps…

am

Hi Pensamente,

thanks for the reply and tips. I got the movieclip with the mousetrailer effect, so that is one part. However, when I import the transition.tween and easing class, I get a syntax error in my code. Leaving them out of the AS doesnt help (duh=]) but the logo freezes when it is clicked.

My question… How do I properly intergrate that transition/tweening/easing class in the script? do I have to code something extra (location of x & Y after the release?)

I have in the first layer the as you gave me. in the second layer I’ve got a movieclip with the name yourMC. Where did i go wrong?

ok, this is really strange… I made a new document and it seems the work! now I’ve got a new question… how can I tell the movieclip that it should go to the middle of the movie when it’s been clicked?

Edit: got that also now… thanks again !

sorry the no reply, but i was out this weekend
nice to know u got your questions solved :wink:

.am

hehe I was out to, tried to understand the script this morning after a quick review last friday…
Now I’m trying to have a transition between the logo and the actual content. Let’s have a livedocs moment =]