Skip navigation
sdcowart
Currently Being Moderated

AS3 Click Tag - Please help!

Oct 13, 2010 9:30 AM

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"));

}

Will you please help me and let me know how to accomplish what they are asking for?
Thank you!!!

 
Replies
  • Currently Being Moderated
    Oct 13, 2010 10:30 AM   in reply to sdcowart

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 13, 2010 12:25 PM   in reply to sdcowart

    You're welcome

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points