# Question About "outer Space" Concept!

**URL:** <https://forum.kirupa.com/t/question-about-outer-space-concept/12179>\
**Category:** flash\
**Created:** [January 28, 2003, 12:55am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179 "2003-01-28T00:55:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelly\_Nunes](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Kelly\_Nunes](https://forum.kirupa.com/u/Kelly_Nunes)\
**Post date:** [January 28, 2003, 12:55am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/1 "2003-01-28T00:55:12Z")

</div>

Hey Flashers,

I have a question about a concept I’m trying to develop and I was wondering if there was anyone out the who could point me in the right direction. Any help would be greatly appreciated.

What I am trying to do is to create a Flash intro sort of like the opening to a Star Wars movie, except no scrolling text. I want it to appear as though the viewer is floating through space with stars passing by.

Is there a way to create this type of effect in Flash? If so, please write me and let me know how this might be done. Thanks in advance. I’m looking forward to hearing from you.

Thanks,

Kelly:P

---

<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:** [January 28, 2003, 1:01am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/2 "2003-01-28T01:01:50Z")

</div>

umm a starfield backdrop moving from left to right?

for some reason I think what you want isnt as simple as that… can you exaplain it a little better? All a basic SW-like starfield backdrop would be is a space image moving sideways (or vertically) in the background.

---

<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:** [January 28, 2003, 1:04am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/3 "2003-01-28T01:04:02Z")

</div>

I think s/he means it moves inwards, like the windows screensaver…?

or not… just me guessing 🙂

---

<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:** [January 28, 2003, 1:06am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/4 "2003-01-28T01:06:05Z")

</div>

Hey Guys,

The last post is correct - I want the stars to be coming at the viewer just like the windos screen saver. Is there a way to create such an effect in Flash?

Thanks,

Kelly

P.S. I’m a guy…LOL:P

---

<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:** [January 28, 2003, 4:45am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/5 "2003-01-28T04:45:38Z")

</div>

here’s an approach using prototypes.

---

<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:** [January 28, 2003, 4:48am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/6 "2003-01-28T04:48:31Z")

</div>

simple but cute:

```auto

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();
}

```

copy and paste (and make sure the background is set to black :))

[edit]sbeener beat me to the punch ;)[/edit]

---

<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:** [January 28, 2003, 7:08am UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/7 "2003-01-28T07:08:35Z")

</div>

nothing says zooming through space like 3d perspective.

i like yours better. : )

---

<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:** [January 31, 2003, 6:15pm UTC](https://forum.kirupa.com/t/question-about-outer-space-concept/12179/8 "2003-01-31T18:15:35Z")

</div>

Hey Guys,

I just wanted to thank you all for the help. However, I have a problem and can’t seem to get the darn thing to work. When I try to check the code it tells me theres an error on line 26 and I can’t seem to fix it. If anyone can hlep me with this I’d appreciate it.

Thanks,

Kelly
