-
Stop movement when reached position
I have code that moves a movie from right to left: -
xStep = 3;
yStep = 3;
char._x = char._x - xStep;
How can I make this stop moving at a particular x, y coordinate?
-
with a simple "if" condition
just put an "if" condition that checks if the MC has reached the _x you want it to, and when it does reset xStep and yStep to zero (0).
i guess you are using a loop to keep the MC moving, so the condition should go in that loop checking each the position each time.
got me?
if you need the exact code.. let me know
Matti Bar-Zeev,
scriptaholic.
-
Can I have the code?
Please can you give me the code, I am kinda struggling
Thanks
-
well... first things first.
can you post your code here, or tell me the kind of loop (or event handler) that you are using in order to move the MC?
good... thatwill give me a hint of how to approch this.
bye
Matti Bar-Zeev,
scriptaholic.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|