# OOP question

**URL:** <https://forum.kirupa.com/t/oop-question/266506>\
**Category:** Uncategorized\
**Created:** [July 21, 2008, 4:27pm UTC](https://forum.kirupa.com/t/oop-question/266506 "2008-07-21T16:27:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hooligan123](https://avatars.discourse-cdn.com/v4/letter/h/ea666f/32.png) [@Hooligan123](https://forum.kirupa.com/u/Hooligan123)\
**Post date:** [July 21, 2008, 4:27pm UTC](https://forum.kirupa.com/t/oop-question/266506/1 "2008-07-21T16:27:44Z")

</div>

I was wondering if you could do something like this in AS3:

```auto
 
package {
public class something {
public function something {
//...
//...
  this.addEventListener(Event.COMPLETE, callFunction);
}
public function callFunction(evt:Event):void {
 
}
}
 
}
 

```

and then in the flash movie customize that callFunction like in as2:

```auto
 
var blah:something = new something();
blah.callFunction = function() {
//code
}

```

or do i have to dispatch an event in the class and then in the flash add a listener for that event and make my own function…  
But that just seems like an extra step.
