# Passing objects to eventhandlers

**URL:** <https://forum.kirupa.com/t/passing-objects-to-eventhandlers/276903>\
**Category:** flash\
**Created:** [December 4, 2008, 9:22pm UTC](https://forum.kirupa.com/t/passing-objects-to-eventhandlers/276903 "2008-12-04T21:22:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarMel](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@MarMel](https://forum.kirupa.com/u/MarMel)\
**Post date:** [December 4, 2008, 9:22pm UTC](https://forum.kirupa.com/t/passing-objects-to-eventhandlers/276903/1 "2008-12-04T21:22:23Z")

</div>

Hy Guys!

Let me first introduce myself: I am Marcel, I live in the Netherlands… I’m fairly new to Kirupa, that is, new to posting my problems/findings. I’m using flash (CS 3) now for allmost a year, and the threads in kirupa helped me through sometimes!

Now, my problem. I’m making my own Portfolio, and i have a problem with eventhandlers. I have a couple different objects, lets call em A, B, etc. I want to do the same things to these objects, when i hover over, or click on them. I want to do this with, obviously, event handlers. The tricky part is, i want to make a bunch of eventhandlers for every object, but all handlers have to call the same function. To do this, i have to put the object as an variable in the event handler. Only, this is not possible in AS3! How can i do this?

Since this is my first thread here, i hope it is clear for you guys! If it isn’t, just ask!

Greetings!  
Marcel
