# Help With Cloud Effect!

**URL:** <https://forum.kirupa.com/t/help-with-cloud-effect/16296>\
**Category:** flash\
**Created:** [March 23, 2003, 9:07am UTC](https://forum.kirupa.com/t/help-with-cloud-effect/16296 "2003-03-23T09:07:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelly\_Nunes](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Kelly\_Nunes](https://forum.kirupa.com/u/Kelly_Nunes)\
**Post date:** [March 23, 2003, 9:07am UTC](https://forum.kirupa.com/t/help-with-cloud-effect/16296/1 "2003-03-23T09:07:05Z")

</div>

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](http://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](http://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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 23, 2003, 9:22am UTC](https://forum.kirupa.com/t/help-with-cloud-effect/16296/2 "2003-03-23T09:22:31Z")

</div>

it’s the same thing …

this is the code in the tutorial

```auto
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

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

```

and change the variable _speed_ to whatever you want

the script should look like this:

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

```

😉 =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 23, 2003, 9:31am UTC](https://forum.kirupa.com/t/help-with-cloud-effect/16296/3 "2003-03-23T09:31:41Z")

</div>

Hey Kax,

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

Kelly =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 23, 2003, 9:35am UTC](https://forum.kirupa.com/t/help-with-cloud-effect/16296/4 "2003-03-23T09:35:35Z")

</div>

anytime **kelly** =)

and yes, let me know how it goes 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 23, 2003, 10:03am UTC](https://forum.kirupa.com/t/help-with-cloud-effect/16296/5 "2003-03-23T10:03:19Z")

</div>

sorry … i forgot to remove another useless line. you don’t need two _if statements_ 😛

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

```

just in case … 😉

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

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

```

=)
