I have been reading through all the posted questions about click tags and can not figure out my problem.
I have a button being loaded dynamically "myViewPackagesBtn". The publication I am creating this banner ads for is saying I need to create a clickTag and not have a hard coded url and they ned to be able to track the clicks.
They said to use this code:
on (release) {
getURL(clickTag, "_blank");
}
My AS3 code is as follows:
myViewPackagesBtn.addEventListener(MouseEvent.MOUSE_UP,goSite1);
function goSite1(evt:MouseEvent):void{
navigateToURL(new URLRequest("http://phgoffers.com/participatingHotels.aspx?id=327&src=12113815"));
}
If they require you to use the AS2 code, then you can't use your AS3 code. If you can use your AS3 code, then you just need to replace the url with the clickTag variable...
myViewPackagesBtn.addEventListener(MouseEvent.MOUSE_UP,goSite1);
function goSite1(evt:MouseEvent):void{
navigateToURL(new URLRequest(clickTag), "_blank");
}
To get the clickTag variable assigned you'll probably need to look into using FlashVars. The clickTag value is usually assigned as part of the html code for embedding the swf in the web page. That allows whoever to change the link via the html code rather than having to edit the swf file. You may want to check with whoever is writing the rules for this.
North America
Europe, Middle East and Africa
Asia Pacific