# \[AS3\] Vibration

**URL:** <https://forum.kirupa.com/t/as3-vibration/239736>\
**Category:** flash\
**Created:** [September 25, 2007, 2:54pm UTC](https://forum.kirupa.com/t/as3-vibration/239736 "2007-09-25T14:54:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gazurt](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gazurt/32/4060_2.png) [@Gazurt](https://forum.kirupa.com/u/Gazurt)\
**Post date:** [September 25, 2007, 2:54pm UTC](https://forum.kirupa.com/t/as3-vibration/239736/1 "2007-09-25T14:54:43Z")

</div>

It is little example for beginers…

```auto
function efekt(event:Event) {
    event.target.x = event.target.tx+Math.random()*5;
    event.target.y = event.target.ty+Math.random()*5;
}
function olustur() {
    for (var i:int=0; i<20; i++) {
        var mc:boloncuk = new boloncuk();
        mc.x=Math.random()*stage.stageWidth;
        mc.y=Math.random()*stage.stageHeight;
        //
        var pro:Number = Math.random()*100;
        mc.alpha=pro/100;
        mc.scaleX=mc.scaleY=pro/50;
        mc.tx=mc.x;
        mc.ty=mc.y;
        mc.addEventListener(Event.ENTER_FRAME,efekt);
        addChild(mc);
    }
}
olustur();

```

Then put a movieclip and its class name is boloncuk… Also you can download the example file…

Thats all :sc:
