Help With Cloud Effect!

Hey Fellow Flashers,

I came across this really cool site the other day and I was wondering if anyone could take a look at it and tell me what the actionscripting might look like to create the same type of effect.

The website is

www.sundancepoolsandspas.com

The effect I’m trying to create is the cloads rolling from left to right in the background. I know there is a tutorial here on Kirupa.com for something similar, but that tutorial speeds up, slows down, and has the graphic follow the mouse.

I am merely interested in making the clods slowly roll through the screen from left to right. If anyone out there cn help me out I would greatly appreciate it.

Thanks,

Kelly :beam:

it’s the same thing …

this is the code in the tutorial

onClipEvent (load) {
xcenter = 150;
speed = 1/10;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
this._x += (distance*speed);
if (this._x > 0) this._x = -300;
if (this._x < -300) this._x = 0;
}

just remove this lines

xcenter = 150;
var distance = _root._xmouse-xcenter;

and change the variable speed to whatever you want

the script should look like this:

onClipEvent (load) {
**speed = 4**;
}
onClipEvent (enterFrame) {
this._x += speed;
if (this._x > 0) this._x = -300;
if (this._x < -300) this._x = 0;
}

:wink: =)

Hey Kax,

Thanks for the help. I will give it a shot and let you know how it turns out.

Kelly =)

anytime kelly =)

and yes, let me know how it goes :wink:

sorry … i forgot to remove another useless line. you don’t need two if statements :stuck_out_tongue:

onClipEvent (load) {
speed = 4;
}
onClipEvent (enterFrame) {
this._x += speed;
if (this._x > 0) this._x = -300;
}

just in case … :wink:

in fact … if the speed will always be same the same you can just

onClipEvent (enterFrame) {
this._x += 4;
if (this._x > 0) this._x = -300;
}

=)