# Movie clips

**URL:** https://forum.kirupa.com/t/movie-clips/32135
**Category:** Uncategorized
**Created:** [October 1, 2003, 11:51pm UTC](https://forum.kirupa.com/t/movie-clips/32135 "2003-10-01T23:51:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tziviak](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@tziviak](https://forum.kirupa.com/u/tziviak)
#### Post date: [October 1, 2003, 11:51pm UTC](https://forum.kirupa.com/t/movie-clips/32135/1 "2003-10-01T23:51:50Z")

</div>

I have many movieclips -I have 10 movieclips for each type-and i have around 7 types of movie clips (ex. 10 red squares, 10 green triangles, 10 blue circles movieclips) now I want a different action to occur if any of the movieclips get clicked-but the same action should occur if the same type gets clicked (ex. if the user clicks on any of the blue circle-it should get dragged, if they click on any of the green triagles-it should get deleted and so on)

what’s an efficient way of doing it except for  
if square1.onclick=square2.onlick=function()…

if triangle1.onclick=triangle2.onlick=function()…

there’s a prototype-but that affects all the movieclips-is there a way for me to make each of the movie clips-sort of a different category (object) so that way I can use prototype keyword-or anything else-to have the same affect? and not have to write repetitious code? (maybe some sort of inheritence to movieclip)

thank you

if you need any additional info-let me know
