Hey 2all any idea on this

Hail 2 all scripters,:evil:

suppose you have

point A(x,y)
and
point B(x,y)

And you have a line between those points.
How do i make point a and b move across stage while the line keeps in between the two points.
:hangover: :crazy:

Greetz 2 all from
Deamothul - the script keeper - :alien:

MovieClip.prototype.square = function(r) {
	this.beginFill(0, 100);
	this.moveTo(-r, -r);
	this.lineTo(r, -r);
	this.lineTo(r, r);
	this.lineTo(-r, r);
	this.lineTo(-r, -r);
	this.endFill();
};
MovieClip.prototype.move = function() {
	this.x = Math.round(Math.random()*Stage.width);
	this.y = Math.round(Math.random()*Stage.height);
	this.onEnterFrame = function() {
		this._x += (this.x-this._x)/10;
		this._y += (this.y-this._y)/10;
		if (Math.ceil(this._x) == this.x || Math.ceil(this._y) == this.y) {
			this.x = Math.round(Math.random()*Stage.width);
			this.y = Math.round(Math.random()*Stage.height);
		}
	};
};
this.createEmptyMovieClip("l", 0).onEnterFrame = function() {
	this.clear();
	this.lineStyle(1, 0, 50);
	this.moveTo(a._x, a._y);
	this.lineTo(b._x, b._y);
};
this.createEmptyMovieClip("a", 1).square(2);
this.createEmptyMovieClip("b", 2).square(2);
a.move();
b.move();

does that help? =)

:slight_smile: kax, this helps me BigTime.:slight_smile:
Thanz a lot and greetz from :
deamothul - the script keeper - :skull:

:slight_smile: :slight_smile: :slight_smile: :slight_smile:

you’re welcome :wink:
… and good luck =)