# Prototypes and funtions

**URL:** <https://forum.kirupa.com/t/prototypes-and-funtions/44206>\
**Category:** flash\
**Created:** [March 1, 2004, 6:27pm UTC](https://forum.kirupa.com/t/prototypes-and-funtions/44206 "2004-03-01T18:27:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lektromoog](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@lektromoog](https://forum.kirupa.com/u/lektromoog)\
**Post date:** [March 1, 2004, 6:27pm UTC](https://forum.kirupa.com/t/prototypes-and-funtions/44206/1 "2004-03-01T18:27:35Z")

</div>

This may be a little problem but I can’t figure out.  
I try to set a prototype that controls a kind of vibrating movement for letters. These letters are inside of a mc called VE(vibr. effect)  
and I type the code in the first frame of the mc timeline but doesn´t works.

this is the code

[FONT=courier new]MovieClip.prototype.vib = funtion();[/FONT]

[FONT=courier new]sx = this.\_x;[/FONT]  
[FONT=courier new]sy = this.\_y;[/FONT]  
[FONT=courier new]this.\_x = sx+(Math.random()\*5);[/FONT]  
[FONT=courier new]this.\_y = sy+(Math.random()\*5);[/FONT]

[FONT=courier new]for (i=0; i\<21; i++) {[/FONT]  
[FONT=courier new] \_root[“ve”+i].vib();[/FONT]  
[FONT=courier new]}[/FONT]

If anyone can help I’d be grateful:

hr:
