stageWebView 无法在我的三星 Nexus 设备上运行
我有以下代码,它在我的桌面上的 AIR 设备模拟器中运行良好。但是当我将其安装在设备(带有 Android 2.3 的三星 Nexus)上时,它没有加载任何内容。
code:
import flash.media.StageWebView;
import flash.events.LocationChangeEvent;
import flash.geom.Rectangle;
var wv:StageWebView = new StageWebView();
wv.viewPort = new Rectangle(0,0.stage.width,stage.height);
wv.stage = stage;
wv.loadURL("http://unitedmindset.com/jonbcampos");
I have following code And it is working fine in AIR device simulator on my desktop. But when i install it on device(samsung nexus with Android 2.3) it is loading nothing.
code:
import flash.media.StageWebView;
import flash.events.LocationChangeEvent;
import flash.geom.Rectangle;
var wv:StageWebView = new StageWebView();
wv.viewPort = new Rectangle(0,0.stage.width,stage.height);
wv.stage = stage;
wv.loadURL("http://unitedmindset.com/jonbcampos");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该尝试舞台的 stage.stageWidth 和 stage.stageHeight 属性。
wv.viewPort = new 矩形(0,0.stage.stageWidth ,stage.stageHeight);
stage.width 返回 0,这就是您看不到 StageWebView 的原因。
You should try the stage.stageWidth and stage.stageHeight propreties of the stage.
wv.viewPort = new Rectangle(0,0.stage.stageWidth ,stage.stageHeight);
the stage.width returns 0 and that is why you can't see the StageWebView.