【问题标题】:Adobe Air - Display banner through HTMLAdobe Air - 通过 HTML 显示横幅
【发布时间】:2012-03-16 13:03:21
【问题描述】:

我正在使用 Adob​​e Flash CS 5 和 AIR 2.5 创建一个桌面应用程序。是否可以在应用程序内通过 HTML 和 JavaScript 显示横幅?

JS:

  <script type="text/javascript">
(function(){
  var bsa = document.createElement('script');
     bsa.type = 'text/javascript';
     bsa.async = true;
     bsa.src = 'http://example.com/ac/bsa.js';
  (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
})();
</script>

HTML:

<div class="headerAd"> 
 <div id="bsap_124567" class="bsarocks bsap_1234524d29"></div>
  </div>

谢谢。乌力

【问题讨论】:

    标签: actionscript-3 apache-flex air


    【解决方案1】:

    【讨论】:

    • 是否可以将 2 个网站加载到 2 个不同的容器中?我试过这段代码:pastebin.com/9FKEdJyS 它给了我这个错误 Error #2044: Unhandled ErrorEvent:。 text=加载错误。
    • 应该可以的。尝试将 ErrorEvent 和 IOErrorEvent 处理程序添加到加载程序以获取更多信息。我的猜测是您在 URL 中使用的是 https 而不是 http
    • import flash.events.IOErrorEvent;webView.addEventListener (IOErrorEvent.IO_ERROR, noXMLAvailable, false, 0, true);
    • 私有函数 noXMLAvailable (e:Event):void { webView.removeEventListener (IOErrorEvent.IO_ERROR, noXMLAvailable);跟踪(e);}
    • 我正在使用 http 并添加了监听器。仍然收到相同的错误,并且没有更多信息:错误 #2044:未处理的错误事件:。 text=加载错误。有什么想法吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-23
    • 2015-10-21
    • 1970-01-01
    • 2010-09-10
    • 2021-05-29
    相关资源
    最近更新 更多