Move movieclip to certain coordinates

Hey,

I have a movieclip that has a horizontal line in it… Also in this flash movie (not in that movieclip) I have an array of links that will change the value of a variable to a different y coordinate (something like ‘50’ or ‘73’) when clicked.

I would like for the movieclip with the horizontal line to move, using actionscript, to the y coordinate specified by that variable. I need it to move from its current location to that location, so no matter where it is on the site, it will move vertically to the coordinate specified by the variable.

Any help would be great (-: .

-Nick :disco:

change the line to a simblo the just ad this action

if(z=73){
telltarget._y.
}

sould ask in actionskript forum. i am not a real wizzard in actionskript.

This question has been asked before. Do a search on the forums, with keywors such as easing, scripted motion…

T-O > That code is not going to work.

*Originally posted by Ilyas da Pom *
**T-O > That code is not going to work. **

LOL I know :hr:

I just tried searching, but couldn’t find what I’m looking for …

Maybe you guys could point me to a thread discussing this same topic, or maybe a tutorial or something?

-Nick


MovieClip.prototype.moveY = function(newY, speed) {
	pos = (newY > this._x);
	speed = Math.abs(speed);
	moveMe = (speed >= Math.abs(this._y - newY)) ? this._y = newY : undefined;
	if (moveMe == undefined) {
		this.onEnterFrame = function() {
			trace(this._y);
			if (pos) {
				(this._y < newY) ? this._y += speed : delete this.onEnterFrame;
			} else {
				(this._y > newY) ? this._y -= speed : delete this.onEnterFrame;
			}
		};
	}
};

btw. here’s the link http://www.kirupaforum.com/forums/showthread.php?s=&postid=391649#post391649
:stuck_out_tongue: