# 3D Space Travel

**URL:** <https://forum.kirupa.com/t/3d-space-travel/15538>\
**Category:** flash\
**Created:** [March 15, 2003, 11:01am UTC](https://forum.kirupa.com/t/3d-space-travel/15538 "2003-03-15T11:01:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LATO](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@LATO](https://forum.kirupa.com/u/LATO)\
**Post date:** [March 15, 2003, 11:01am UTC](https://forum.kirupa.com/t/3d-space-travel/15538/1 "2003-03-15T11:01:47Z")

</div>

Hi,

I found a cool effect on flashkit, 3d space. But now it looks like your moving very slow. How can I increase the speed and just let it stop after a few seconds?  
Maby someone can take a look @ the fla.

Thanx

---

<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:** [March 15, 2003, 2:27pm UTC](https://forum.kirupa.com/t/3d-space-travel/15538/2 "2003-03-15T14:27:14Z")

</div>

That stinks 😉 The star movement is tweened in the, Oddly enough, “star movin in a path” clip in the library. Youd have to retween for it to be faster :-\

This might interest you though

[http://www.kirupaforum.com/forums/showthread.php?s=&postid=99378](http://www.kirupaforum.com/forums/showthread.php?s=&postid=99378)

---

<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:** [March 16, 2003, 10:26am UTC](https://forum.kirupa.com/t/3d-space-travel/15538/3 "2003-03-16T10:26:56Z")

</div>

Thnx, this works perfect. The stars have to stop after a few seconds… I tried changing the speed but no succes…

```php
reference = 150;
speed = 20;
MovieClip.prototype.asNewStar = function(){
	this.x = random(Stage.width)-Stage.width/2;
	this.y = random(Stage.height)-Stage.height/2;
	this.z = 1000;
	
	this.onEnterFrame = function(){
		if ((this.z -= speed) < -100) this.removeMovieClip();
		else this.drawStar();
	}
}

MovieClip.prototype.drawStar = function(){
	this.clear();
	this.lineStyle(5-this.z/200, 0xffffff, 100);
	perspectiveRatio = reference/(reference + this.z);
	this.moveTo(this.x*perspectiveRatio, this.y*perspectiveRatio);
	perspectiveRatio = reference/(reference + this.z + 20);
	this.lineTo(this.x*perspectiveRatio, this.y*perspectiveRatio);
}

this.createEmptyMovieClip("galaxy",1);
galaxy._x = Stage.width/2
galaxy._y = Stage.height/2;
galaxy.onEnterFrame = function(){
	this.createEmptyMovieClip("star"+ depth, depth++).asNewStar();
}

```

---

<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:** [March 16, 2003, 12:51pm UTC](https://forum.kirupa.com/t/3d-space-travel/15538/4 "2003-03-16T12:51:28Z")

</div>

to stop those stars, just delete galaxy’s onEnterFrame

```auto

delete galaxy.onEnterFrame

```
