Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Google click tags

New Here ,
Sep 10, 2013 Sep 10, 2013

Hi People,

Working on some flash banners that i need to run on google.

Im having issues embedding the google click tag code.

Im using flash cs3 (action script 3).

This is the error message i keep getting after having placed the clicktag

TypeError: Error #2007: Parameter url must be non-null.

          at global/flash.net::navigateToURL()

          at Function/<anonymous>()

Your assistance will be hihly appreciated.

TOPICS
ActionScript
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 10, 2013 Sep 10, 2013

The code will work but it somewhat defeats the intention of the clickTag parameter.

I don't see where you used a variable named "url" in the original code, but the portion of the code that reads:

     root.loaderInfo.parameters.clickTAG

is a parameter that gets assigned in the swf embedding code of the html page.  The swf file reads it in usign that line of Actionscript code.  It defines the url that gets used for the clickTag link, and allows whoever to update it without having to modify the swf f

...
Translate
LEGEND ,
Sep 10, 2013 Sep 10, 2013

The error is indicating that a variable you have named "url" is coming up null.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 10, 2013 Sep 10, 2013

Hey thanks for this, below is the code i was using....

import flash.events.MouseEvent;

import flash.net.URLRequest;

// ......

gbutton.addEventListener(

   MouseEvent.CLICK,

   function(event: MouseEvent) : void {

  flash.net.navigateToURL(new URLRequest( root.loaderInfo.parameters.clickTAG), "_blank");

     }

   );

--------------------END---------------

So i amended the code to:

import flash.events.MouseEvent;

import flash.net.URLRequest;

// ......

gbutton.addEventListener(

   MouseEvent.CLICK,

   function(event: MouseEvent) : void {

  flash.net.navigateToURL(new URLRequest( "http://www.domain-name.com"), "_blank");

     }

   );

-----------------------------------

The above code works. Do u think i need to add anything else?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 10, 2013 Sep 10, 2013

The code will work but it somewhat defeats the intention of the clickTag parameter.

I don't see where you used a variable named "url" in the original code, but the portion of the code that reads:

     root.loaderInfo.parameters.clickTAG

is a parameter that gets assigned in the swf embedding code of the html page.  The swf file reads it in usign that line of Actionscript code.  It defines the url that gets used for the clickTag link, and allows whoever to update it without having to modify the swf file.  The way you have it now would require editing to create a new swf file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 11, 2013 Sep 11, 2013

Hey ned,

Thnks for your assistance. Im beginning to understand how the actual code functions.

I replaced the below line of code with the actual url of the website and the errors did not show after running the flash ad.

root.loaderInfo.parameters.clickTAG

So should i leave above line of code as is when i upload it to the google ads platform or should i actualy replace the line of code with the actual url?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2013 Sep 11, 2013

That code is what should normally be in the file, not the actual url.  The url should end up being specified as a parameter in the html page's embedding code for the Flash ad.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 11, 2013 Sep 11, 2013

Back here in Kenya we say " Asante sana" meaning Thank you very much. Now i feel at ease 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2013 Sep 11, 2013
LATEST

You're welcome

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 10, 2013 Sep 10, 2013

you probably forgot to surround the url with quotes.  ie, that should be a string, not an undefined variable in the new URLRequest().

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines