Copy link to clipboard
Copied
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.
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
...Copy link to clipboard
Copied
The error is indicating that a variable you have named "url" is coming up null.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Back here in Kenya we say " Asante sana" meaning Thank you very much. Now i feel at ease 🙂
Copy link to clipboard
Copied
You're welcome
Copy link to clipboard
Copied
you probably forgot to surround the url with quotes. ie, that should be a string, not an undefined variable in the new URLRequest().