Hey, Im working on making a moving cloud effect right now. My question is this. When the cloud reaches the edge of the screen. to go back to the other side and come in. These clouds will be in the background of the page.
Thanks!
Fidelity
Do a board seach for continuous scrolling backgrounds/MCs or just crawl the web for the same keywords. (I believe there’s even an article on kirupa.com)
eh… I learned this some time ago, around here… or somewhere. I don’t know if it’s as effective as the one posted above.
This could be set in your Cloud mc.
Assuming your cloud is moving from left to right.
Frame 1 - Define the edges of your stage. Since clouds are usually moving horizontally, you only need to define the left and right edges. Then you define the speed you want your cloud to move yet.
left_edge = 0;
right_edge = 540;
speed = -5;
Frame 2 - What happens when the cloud hits one of the edges? It wraps to the other!
_x += speed;
if(_width+x < left_edge){
_x = _width+right_edge;
}
Frame 3 - Constantly checking to see if the cloud is hitting the left all and keeps the cloud moving
gotoAndPlay(2);
Please re-read this post, I did a bit of editing -_-
eh… I learned this some time ago, around here… or somewhere. I don’t know if it’s as effective as the one posted above.
This could be set in your Cloud mc.
Assuming your cloud is moving from left to right.
Frame 1 - Define the edges of your stage. Since clouds are usually moving horizontally, you only need to define the left and right edges. Then you define the speed you want your cloud to move yet.
left_edge = 0;
right_edge = 540;
speed = -5;
Frame 2 - What happens when the cloud hits one of the edges? It wraps to the other!
_x += speed;
if(_width+_x < left_edge){
_x = _width+right_edge;
}
Frame 3 - Constantly checking to see if the cloud is hitting the left all and keeps the cloud moving
gotoAndPlay(2);
Please re-read this post, I did a bit of editing -_-