# How to make vertical bars that move randomly

**URL:** <https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779>\
**Category:** flash\
**Created:** [August 31, 2004, 7:14am UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779 "2004-08-31T07:14:32Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lookie](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@Lookie](https://forum.kirupa.com/u/Lookie)\
**Post date:** [August 31, 2004, 7:14am UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/1 "2004-08-31T07:14:32Z")

</div>

Hello,

As a Flash beginner [this](http://www.aldastudio.si/tehnologija/tech.swf) effect looks quite cool to me 🙂 Does anybody have any tips on how to make those vertical bars that move randomly and how to organize layers or making movie clips for the fading in of the object. Thanks for any help

Luke

---

<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:** [September 1, 2004, 9:33am UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/2 "2004-09-01T09:33:27Z")

</div>

Are you looking to make an Equilaiser?

---

<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:** [September 1, 2004, 9:49am UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/3 "2004-09-01T09:49:40Z")

</div>

Hi!

Actually…no. What i’m trying to do are those vertical bars that move randomly horizontal. You can see it in the upper link (under “this”).

Luke

---

<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:** [September 1, 2004, 4:15pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/4 "2004-09-01T16:15:58Z")

</div>

If you are asking what it seems like you are asking… its pretty easy…

Just make several rectangles… and motion tween them on and off the stage…

---

<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:** [September 1, 2004, 6:33pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/5 "2004-09-01T18:33:42Z")

</div>

if you want some random motion:  
put a rectangle into a new movieclip  
then on the movieclip, add this script:

```auto
onClipEvent(enterFrame) {
   factor=1; //you can adjust this to give the movieclip larger abilities of movement.
   this._y += Math.random()*factor;
}

```

sorted 🙂  
if you want to have multiple moving rectangles, simple copy and paste the movieclip. 🙂

---

<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:** [September 1, 2004, 6:36pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/6 "2004-09-01T18:36:22Z")

</div>

yea… i always just make it random manually…

just but a few bars here and there on the stage…  
then here and there off the stage…

and tween them randomly on and off the stage…

---

<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:** [September 1, 2004, 6:38pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/7 "2004-09-01T18:38:21Z")

</div>

to fade in, simply create a new movieclip and make a new motion tween.  
in the first frame of the mortion tween change the alpha of the movieclip to 0, and to 100 at the end.

if you want to do it with actionscript, you can do it like this:

```auto
onClipEvent(enterFrame) {
   if (this._alpha < 100) {
      this._alpha += 5; //you can change this to make the increasing alpha speed different.
   }
}

```

hope this helps

---

<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:** [September 1, 2004, 6:39pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/8 "2004-09-01T18:39:37Z")

</div>

> [@kmax](#):
>
> yea… i always just make it random manually…
> 
> just but a few bars here and there on the stage…  
> then here and there off the stage…
> 
> and tween them randomly on and off the stage…

rotf - if you predefine the movement, it is not random…

---

<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:** [September 1, 2004, 6:41pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/9 "2004-09-01T18:41:53Z")

</div>

whatever… looks random… thats what this is all about…  
making things look like things they are not…

---

<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:** [September 1, 2004, 6:44pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/10 "2004-09-01T18:44:38Z")

</div>

are all 125 of your posts that newbie?

---

<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:** [September 1, 2004, 6:47pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/11 "2004-09-01T18:47:18Z")

</div>

I dont know… may be…

Hey thanks for your kindness though… I appreciate it.

Thanks  
kj

---

<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:** [September 1, 2004, 6:51pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/12 "2004-09-01T18:51:19Z")

</div>

muwhahaha. make that 126

all i was saying was: you’re giving this guy stuff he doesn’t want. if someone is aiming to create random movement then they would create random movement, they wouldn’t create something that is LIKE random movement, especially when random movement is 100% possible (you may wish to refer above, kmax - i’ve given you a how-to) and also: using as instead of a tween would lower the file size.

---

<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:** [September 1, 2004, 6:55pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/13 "2004-09-01T18:55:39Z")

</div>

thanks for the tip… maybe I will start using that method if the file size is lower…  
maybe easier to since you dont have to make the tweens…

you work as a graphic designer?

---

<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:** [September 1, 2004, 6:56pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/14 "2004-09-01T18:56:42Z")

</div>

no, i’m 15 and still at school.

---

<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:** [September 1, 2004, 8:06pm UTC](https://forum.kirupa.com/t/how-to-make-vertical-bars-that-move-randomly/62779/15 "2004-09-01T20:06:04Z")

</div>

Thanks for help guys!

Luke
