# Getting null on the place of Object

**URL:** https://forum.kirupa.com/t/getting-null-on-the-place-of-object/328234
**Category:** flash
**Created:** [April 30, 2012, 10:52am UTC](https://forum.kirupa.com/t/getting-null-on-the-place-of-object/328234 "2012-04-30T10:52:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DeadlyDude](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@DeadlyDude](https://forum.kirupa.com/u/DeadlyDude)
#### Post date: [April 30, 2012, 10:52am UTC](https://forum.kirupa.com/t/getting-null-on-the-place-of-object/328234/1 "2012-04-30T10:52:14Z")

</div>

Hello guys ,

I am storing the current object in a current\_target, when hittest is true and dispathing an event to document class.  
Here is my code

```auto
if(evt.target.hitTestObject(_targetCont)) {
				 current_target=new MovieClip();
				current_target = evt.target as MovieClip;
				
				dispatchEvent(new HitEvents(HitEvents.DROPPED_TO_TARGET));
				
			}
public function get CurrentTarget()
		{
			
			return(current_target as MovieClip);
		}

```

and then i have added an event listener in document class  
and in the function I am tracing the “current\_target” but its returning null.
