Perspective (Flash MX)


I am trying to create a starfield effect. I have gone through the tutorials here and elsewhere and come so far. I am attaching the fla file along with the code.

The motion as you can see is jerky. Cant figure out what am i doing wrong.

Another thing. I am trying to load this swf into a main movie using the following script:


movies._x = 227;
movies._y = 145;
movies._width = 250;
movies._height = 245;

However the the stars in the child movie do not respect the width and height restrictions. So I have those stars running all around the place in the main movie. Is there a way to curtail these stars besides using a mask (actually havent tried the mask so far, but i am assuming it would work)

It’s so jerky because you don’t have a stop script on the first frame. It just goes to the last frame and starts over again.

But if I do put a stop on the first frame then how do I goback and play the first frame - to plot the stars and then create motion???

Hum, yes… so I noticed . Try and look in the snowflakes tutorial here on kirupa and see how they got it to repreat it self.

I had a look at every conceivable stuff available. The catch in my problem (i think) is that the starting point is inside the screen and emulates the perspective effect. The snow flakes and others are 2D effects and can start of out side the screen.

I tried to set _alpha = 0 at the duplication point and then make it brighther as it enlarges but still of no use.

I created the duplication process into a function and tried to call it through the onenterframe event handler of the instance star - but that was horrible. felt like my televeision screen gone bad.

isnt there a way that I can check at the star coordinates and set it to its original position if it goes beyond the screen limits. I tried to add that code earlier but it wouldnt work. I guess i must have been using the wrong conditions.