简体   繁体   中英

stageWebView is not working on my samsung nexus device

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");

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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