# clickTag in Actionscript 3.0

**URL:** https://forum.kirupa.com/t/clicktag-in-actionscript-3-0/293993
**Category:** flash
**Created:** [August 6, 2009, 3:14pm UTC](https://forum.kirupa.com/t/clicktag-in-actionscript-3-0/293993 "2009-08-06T15:14:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![markjw11](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@markjw11](https://forum.kirupa.com/u/markjw11)
#### Post date: [August 6, 2009, 3:14pm UTC](https://forum.kirupa.com/t/clicktag-in-actionscript-3-0/293993/1 "2009-08-06T15:14:45Z")

</div>

I’ve never used AS3 before, and I have to add a “clickTag” to an online ad for tracking purposes. I get an error #1009 (Cannot access a property or method of a null object reference).  
Here’s my code so far:

var \_url:String = “”;  
if (LoaderInfo(root.loaderInfo).parameters.clickTag)

hiddenbutton.addEventListener(  
MouseEvent.CLICK,  
function():void {  
if (root.loaderInfo.parameters.clickTag.substr(0,5)==“http:”) {  
navigateToURL(  
new URLRequest(root.loaderInfo.parameters.clickTag),  
“\_blank”  
);  
}  
}  
);

This is all greek to me. Does someone know where I’m missing this key bit of code?
