Copy link to clipboard
Copied
Hi,
Im currently doing some google ads on Flash CC but found that google doesnt take a flash player which is above FP 10.1 thus i saved the swf files to my Flash 5.5 and encountered tis error
TypeError: Error #2007: Parameter url must be non-null.
at global/flash.net::navigateToURL()
at MethodInfo-1()
I am working in AS 3 in CS 5.5 Mac and exporting swf files into FP 9. I am very new to this and im wondering if anyone can help me?
here's my code:
thanks in advance!
You should not nest a function in an event listener, let it stand on its own. Also, you should try to let the variable stand alone to assign it so that there is a better chance it is ready when it is called upon. (those imports are not needed if coded in the timeline)
var url:String = root.loaderInfo,parameters.clickTAG as String;
clicktag.addEventListener(MouseEvent.CLICK, processCT);
function processCT(event:MouseEvent):void {
navigateToURL(new URLRequest(url), "_blank");
}
Copy link to clipboard
Copied
You should not nest a function in an event listener, let it stand on its own. Also, you should try to let the variable stand alone to assign it so that there is a better chance it is ready when it is called upon. (those imports are not needed if coded in the timeline)
var url:String = root.loaderInfo,parameters.clickTAG as String;
clicktag.addEventListener(MouseEvent.CLICK, processCT);
function processCT(event:MouseEvent):void {
navigateToURL(new URLRequest(url), "_blank");
}
Copy link to clipboard
Copied
thanks a lot! I have included the right url and it worked perfectly!
Copy link to clipboard
Copied
You're welcome
Find more inspiration, events, and resources on the new Adobe Community
Explore Now