Adobe Air stagewebview 不使用 useNative 浏览器
Adobe Air stagewebview not using useNative browser
您好,我正在创建一个带有 stagewebview 的桌面 flex 应用程序,它不会使用本机浏览器而不是旧的 webkit。 documentation says to specify useNative
在第一个参数中为真,如下所示。有人有想法吗?
我正在 windows 使用 Air 17 和 Flash Builder 进行构建。用户代理始终是:
Mozilla/5.0 (Windows; U; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/17.0
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
applicationComplete="stageTest(event)"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import flash.geom.Rectangle;
import flash.media.StageWebView;
private var webView:StageWebView;
public function stageTest(e:*) {
webView = new StageWebView(true);
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
webView.stage = this.stage;
webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
webView.loadURL( "http://whatsmyuseragent.com/" );
}
]]>
</fx:Script>
</s:WindowedApplication>
The documentation says AIR 2.5+, because StageWebView, and thefore the constructor, was added in AIR 2.5, but useNative was added in AIR 3.9 I think
如果您指定 swf-version 19
或更高版本,您将看到正在使用的本机浏览器。
n.b。论坛 post 提到 swf-version 22,但测试表明版本 18 与 19 是此行为发生变化的时候。
您好,我正在创建一个带有 stagewebview 的桌面 flex 应用程序,它不会使用本机浏览器而不是旧的 webkit。 documentation says to specify useNative
在第一个参数中为真,如下所示。有人有想法吗?
我正在 windows 使用 Air 17 和 Flash Builder 进行构建。用户代理始终是:
Mozilla/5.0 (Windows; U; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/17.0
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
applicationComplete="stageTest(event)"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import flash.geom.Rectangle;
import flash.media.StageWebView;
private var webView:StageWebView;
public function stageTest(e:*) {
webView = new StageWebView(true);
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
webView.stage = this.stage;
webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
webView.loadURL( "http://whatsmyuseragent.com/" );
}
]]>
</fx:Script>
</s:WindowedApplication>
The documentation says AIR 2.5+, because StageWebView, and thefore the constructor, was added in AIR 2.5, but useNative was added in AIR 3.9 I think
如果您指定 swf-version 19
或更高版本,您将看到正在使用的本机浏览器。
n.b。论坛 post 提到 swf-version 22,但测试表明版本 18 与 19 是此行为发生变化的时候。