So a couple threads down im asking about spirals check out that thread for more info
But I started thinking and maybe im going about this all wrong so put on your thinking caps guys and help me solve this problem
I have a movieclip of a 3D ball in my Library (well give it the Linkage name of “Ball” just for sake of ease)
I want to use ActionScript ONLY to place the ball In the top Left corner (just off screen)
and move the balls in a spiral pattern toward the center of the screen
the part im having problem with is when It creates a new “ball” the new ball pushes all the balls in front of it(or adversly the front ball could pull the rest of the balls(Ive got code to make several objects and have them travel in a spiral trajectory, BUT the problem is that on the outside of the spiral the balls are farther apart and at the center of the spiral they get all bunched up…I want a Uniform distance maintained between the balls at all times (uniform Horiz distance)
anyway if ANYone can help with inspiration/code …aNY Ideas on how i could make this work right
so far the only thing i can think of is a really ****ty work around where i just check this._x , this.y against preset coords and change Direction/speed when this reaches the preset coordinates like
if (this._x < 500 && this._y ==30 ){this._x += 5
}else if (this._x > 500 && this._y < 250){ this._x += 3 ; this._y +=3
}else if (this._x > 500 && this._y < 500){this._x -= 3 ; this._y +=3
}etcetera
obvioustly the resulting patern wont be a spiral(which isnt a huge deal…but this seems like the wrong way to be doing it)
I would really like some nice formula
like this._x += Math.PI*Desired_Speed /cos(xx)*sin(yy)+360
or something that will move my objects in a nice spiral with easily ajusted speed(so as the object gets closer to the center I can manually bump up the speed)
If you read this whole thing than congratulations your a real trooper and maybe you might be able to help with my problem