Here is the HTML I'm using:
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="728" height="90" id="myFlashContent">
<param name="movie" value="test.swf?clickTAG=http:/www.google.com" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="test.swf?clickTAG=http:/www.google.com" align="right" width="728" height="90">
<!--<![endif]-->
<img src="test.jpg" class="ad_section" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
Here is the AS code:
button1.addEventListener(
MouseEvent.CLICK,
function():void {
if (root.loaderInfo.parameters.clickTAG.substr(0,5) == "http:") {
navigateToURL(
new URLRequest(root.loaderInfo.parameters.clickTAG), "_blank"
);
}
}
);
Can anyone tell me what the problem is?
@Guywiththegun40 The problem is if you test it offline in the browser and you haven't added the folder as a trusted location in the Flash Player Setting Manager (you can open it by right clicking on the flash movie in the browser and choosing Global Settings...). This way "http://" won't work, and "http:/" will work, but only in some browsers, in other browsers it will throw an error that there is no folder named "http:". If you don't want to change the Flash Player settings, you can upload the flash file on a server and test it in a browser, then "http://" will work.
North America
Europe, Middle East and Africa
Asia Pacific