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

google ad code wrong

New Here ,
Aug 20, 2010 Aug 20, 2010

I submitted a couple of flash ad banners for a Google ad campaign and the clickTag code they gave me looks like it's for AS2 as it applies the code to an object:

(http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=26938)

on (release) {

getURL(clickTAG, "_blank");
}

I found somewhere some appropriate AS3 code but Google rejected that too. So does anyone know what the proper code is that will satisfy Google?

GF

TOPICS
ActionScript
1.7K
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 ,
Aug 20, 2010 Aug 20, 2010

This should do that (given you code on timeline):

var flashVars:Object = this.root.loaderInfo.parameters;

button.addEventListener(MouseEvent.CLICK, openClickTag);

function openClickTag(evtObj:MouseEvent):void {
    navigateToURL(new URLRequest(flashVars["clickTag"]), "_blank");
}

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 ,
Aug 20, 2010 Aug 20, 2010

Actually I'm getting (or Google is getting) an error still. I made the bg a mc and gave it an instance name that I referenced in your code. I attached to the first frame.

????

GF

BTW:. thanks.

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
Guest
Aug 20, 2010 Aug 20, 2010

I believe the var name is case-sensitive. It should be clickTAG.

navigateToURL(new URLRequest(flashVars["clickTAG"]), "_blank");

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 ,
Aug 20, 2010 Aug 20, 2010

navigateToURL(new URLRequest(flashVars["clickTAG"]), "_blank");

Right...

Actually I also think one should enclose it into try/catch or check for this variable availability.

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 ,
Aug 20, 2010 Aug 20, 2010

still not working. I want to run my (your) code by you to make sure I'm not doing something simply stupid.

on the first frame of the timeline I have AS:

import flash.events.TimerEvent;
import flash.utils.Timer;

var flashVars:Object = this.root.loaderInfo.parameters;

bg_mc.addEventListener(MouseEvent.CLICK, openClickTag);

function openClickTag(evtObj:MouseEvent):void {
    navigateToURL(new URLRequest(flashVars["clickTAG"]), "_blank");
}

I have "bg_mc" as a MC instance name of the background image (it is a movie clip) for my animation so it acts like a button the size of the whole thing. there is a timer working on the last frame of the timeline.

See anything wrong?

GF

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 ,
Aug 20, 2010 Aug 20, 2010

What is not working?


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 ,
Aug 20, 2010 Aug 20, 2010

Google ads says in bold red text "Flash must support clickTAG" when my Ads guy submits it.

GF

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 ,
Aug 20, 2010 Aug 20, 2010

Also, does bg_mc cover all the frames? Is it on the top of all the objects?

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 ,
Aug 20, 2010 Aug 20, 2010

I made a new MC and made it transparent on the first frame above all layers except the actions layer, and lasting to the last frame. I gave it an instance name of "clicktag", so code now goes like this:

var flashVars:Object = this.root.loaderInfo.parameters;

clicktag.addEventListener(MouseEvent.CLICK, openClickTag);

function openClickTag(evtObj:MouseEvent):void {
    navigateToURL(new URLRequest(flashVars["clickTAG"]), "_blank");
}

Incidentally, I found other code and tried it to no avail. It went like this:

var paramList:Object = this.root.loaderInfo.parameters;


clicktag.addEventListener(MouseEvent.CLICK, openURL);


function openURL(evtObj:MouseEvent):void {
    var request:URLRequest = new URLRequest(paramList["clickTag"]);
    navigateToURL(request, "_blank");
}

It also didn't work. And Google is no help whatsoever.

GF

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 ,
Aug 20, 2010 Aug 20, 2010

You should probably post this question on DoubleClick forum (DoubleClick belongs to Google):

http://www.google.com/support/forum/p/dfp?utm_source=gam_forum&utm_medium=et&utm_campaign=gam_forum

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 ,
Aug 20, 2010 Aug 20, 2010

I just went and created my animations in AS2 using the Google code for clickTAG. I did it in Flash CS5. It all went fine. It worked. What a waste of time messing with Google.

Thanks for the help.

GF

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 ,
Aug 20, 2010 Aug 20, 2010
LATEST

>

>

>

No virus found in this incoming message.

Checked by AVG - www.avg.com

Version: 9.0.851 / Virus Database: 271.1.1/3083 - Release Date: 08/20/10 01:35:00

>

actually I showed a page I arrived at from this link to my Google guy

and he said we're using Google adwords and not DFP small business. I saw

something on the DFP Small Business site that said I can turn off the

need for clickTAG altogether when I upload content. I'm not sure what

the relationship is between them, but for now I'm sticking with AS2.

that seemed to work for me.

GF

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