At 10/6/08 09:21 PM, Spiff wrote:
Can someone please help me with my code so that it will shoot the desired object? All it does is make the movie clip stick to the player ship.
if (Key.isDown(Key.SPACE)) {
this.attachMovie("missle", "missle"+i, i);
_root.missle.xv = 10;
_root.missle._x += missle.xv;
If i am correct, what you are doing is that you are executing this line:
_root.missle._x += missle.xv;
only one time, whereas you want it to be moving 10 pixels to the right every frame.
The above solution should work.
I've been noticing a LOT of AS help threads around here. We should really have one massive thread. It would clear up SOOOO many of those junk threads with 1 question post, 1 crappy answer post, 1 final answer post, and 1 thanks, problem resolved post.
Makes 4 posts, and the thread is never to be seen again. Seriously, it's a massive waste of space.