简体   繁体   English

如何在新窗口中打开Flash内容内的链接按钮

[英]How to open link button inside flash content in new window

Same as editing swfobject.js code so hyperlinks inside the flash widget open in a new window (but no response) 编辑swfobject.js代码相同, 因此Flash小部件内的超链接在新窗口中打开 (但无响应)

I have flash content with hyperlinks inside the content. 我有Flash内容,其中包含超链接。 The links are opening in new Tab in all browsers except IE. 链接将在除IE之外的所有浏览器中的新标签页中打开。 In IE its opening as POP-UP . 在IE中,其开头为POP-UP。 So client is requesting to fix it. 因此客户要求对其进行修复。

The flash content is loaded from Tridion CMS. Flash内容是从Tridion CMS加载的。

 {
  var so = new SWFObject('/TridionMultimedia/wired-process_tcm24-2197.swf', 'wiredprocess', '680', '244', '8', '#ffffff');
  so.useExpressInstall("/swf/expressinstall.swf");
  so.addParam("quality", "high");
  so.addParam('wmode', 'transparent');
  so1.addParam('openLinksInNewWindow', 'true');//tried but not working 
  so.write('divtcm24-484-64tcm:24-783-32');

  }
  else
  {
  var so1 = new SWFObject('/TridionMultimedia/COSVideoWidgetRotating_tcm24-191.swf', 'mymovie', '680', '244', '6', '#FFFFFF');
  so1.addParam("quality", "high");
  so1.addParam('wmode', 'opaque');
  so1.addParam('openLinksInNewWindow', 'true');//tried but not working 
  so1.write('divtcm24-484-64tcm:24-783-32');

  }

In the below website i saw the some code as https://tagul.com/forums/topic/forcing-links-to-open-in-a-new-window 在下面的网站中,我看到了一些代码,例如https://tagul.com/forums/topic/forcing-links-to-open-in-a-new-window

<script type="text/javascript">
swfobject.embedSWF("http://tagul.com/cdn/cloudTest.swf", "myCloud",
    "600", "600", "10.0.0", "http://cdn.tagul.com/expressInstall.swf",
    {id: "demo@demo", openLinksInNewWindow: "true"},
    {allowscriptaccess: "always", bgcolor: "#ffffff"},
    {id: "myCloudObject", name: "myCloudObject"});

But not sure how to add in my script . 但不确定如何在脚本中添加。 Or is this something related to browser property. 还是这与浏览器属性有关。

Thanks, 谢谢,

When a link is clicked, you could refer to a function that runs this code: 单击链接后,您可以引用运行以下代码的函数:

var pageURL:String = ExternalInterface.call('YOUR_LINK');
navigateToURL(new URLRequest(pageURL), "_blank");

This should do the trick. 这应该可以解决问题。

You can get the SWF click event URL using [javascript + ExternalInterface] and call a window.open by yourself. 您可以使用[javascript + ExternalInterface]获取SWF点击事件网址,并自行调用window.open。

Check this link: 检查此链接:

Using the ExternalInterface Class to Bridge JavaScript and Flash 使用ExternalInterface类桥接JavaScript和Flash

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM