【问题标题】:Open browser on click of anchor tag from an AIR( flex ) Html Component单击 AIR(flex) Html 组件中的锚标记打开浏览器
【发布时间】:2013-05-06 08:49:22
【问题描述】:

我正在使用 htmlloader 组件在 flex 中呈现 HTML 页面。 html 内容有一个锚标记,单击该标记应在浏览器中启动网页。

这个锚标记不起作用。我们是否必须使用 JS 到 AS(actionScript) 的中间通信才能使其起作用? 这是我用来在 flex 中呈现 html 的代码

 html.location = "https://my_url?path=get_notifications";

HTML sn-p

<a href="url" target="_blank">Go to web</a>

【问题讨论】:

    标签: html apache-flex air


    【解决方案1】:

    问题来自 HTMLLoader 对 target="_blank" 的处理。如果您希望 HTMLLoader 处理 _blank,则需要为 HTMLLoader (HTMLLoader.htmlHost) 创建一个自定义 htmlHost。此自定义 htmlHost 将需要覆盖 createWindow 函数,这将处理 _blank 情况。更多信息可从以下链接获得:

    Adobe - Defining browser-like user interfaces for HTML content

    Forrst - enable link with target='_blank' in Adobe AIR HTMLLoader component

    Sonke Rohde - AIR HTML with “_blank” Links Part II – Using HTMLHost

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-23
      • 1970-01-01
      相关资源
      最近更新 更多