# Object Communication

**URL:** <https://forum.kirupa.com/t/object-communication/150416>\
**Category:** flash\
**Created:** [June 7, 2005, 2:17pm UTC](https://forum.kirupa.com/t/object-communication/150416 "2005-06-07T14:17:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghjr](https://avatars.discourse-cdn.com/v4/letter/g/dec6dc/32.png) [@ghjr](https://forum.kirupa.com/u/ghjr)\
**Post date:** [June 7, 2005, 2:17pm UTC](https://forum.kirupa.com/t/object-communication/150416/1 "2005-06-07T14:17:34Z")

</div>

Need someone to shine some light here.

I currently have a class called **SearchObject** that has the following function:

```auto

public function performSearch(searchQuery) {
		
		// Create XML object to perform the search
		search_xml = new SearchScripts.ResultXML(resultHandler, apiLink, appId, searchQuery);
		
	}

```

So, it basically creates another object from another class defintion when **performSearch** is called. Now this new object created extends the XML object, and what I would like it to do is, whenever it actually loads it call a function from the first object I created (the SearchObject object).

I have done this but not the way I would like to. Right now, whenever I create the XML object I pass the resultHandler function in the argument and call it whenever the XML loads, but isn’t there a way for it to call the resultHandler function directly from the first one and not assign it as a method of the XML object.

That sounded kinda confusing… hope it’s understandable. :crazy:

Cheers!
