all groups > flash actionscript > october 2006 >
You're in the

flash actionscript

group:

Moving Movie Clips back when they exit the frame


Moving Movie Clips back when they exit the frame FlashIsTheCoolest123
10/18/2006 7:17:27 PM
flash actionscript:
This was an assignment for my computer sciences class. We have to determine
what is wrong with our "plain language" code to make a movie clip image thingy
come back to the other side of the stage when it goes through the opposite
side... so if it crossed the right border, how would I make come accros the
left side again? Vice-Versa as well, and up and down. This is the code we were
given to work with (500 px, 500 px) :

if( _root.Thing._x > 500) THEN
_root.Thing._x = 0;
else(_root.Thing._x < 0) THEN
_root.Thing._x = 500;

Thanks for the help :grin;
Re: Moving Movie Clips back when they exit the frame DazFaz
10/18/2006 7:41:08 PM
lol. 10 out of 10 for initiative that?s for sure. But don?t you think its a
little cheeky asking someone else to do your assignment for you. :)

Hares a tip, don?t take anything for granted in your code. Think about ever
single dimension. You are nearly there with what you have already, there?s just
a little more syntax that you need. Also think about how you can check the
equation continuously too.

If you have flash, use the help in there. It?s pretty initiative. Look up:
If, onEnterFrame, Object Statements and functions

Re: Moving Movie Clips back when they exit the frame FlashIsTheCoolest123
10/18/2006 10:53:55 PM
Oh, no, its not a big course or anything, its extra-curricular, for fun, and
this was just something bonus. But, thank you for the morals of this. :wink;
Me and my friends are trying to solve this, and I thought, well, the people at
the Flash forums are smart, Ill give them a try. I don't even really know what
onClip Thingys are, or how the if statement works, it always says it doesn't
match the else with the if... frustrating... :wink;

Thanks again :grin;
Re: Moving Movie Clips back when they exit the frame kglad
10/18/2006 11:28:00 PM
AddThis Social Bookmark Button