Adobe Flex / Flash ビルダー StageWebView を使用して Web ページをレンダリングしようとしましたが、電話の画面の寸法に合わせて Web ページをスケーリングせず、基本的に Web ページの右側を切り取っていません。使ってみました
<meta name="viewPort" content="width=device-width; initial-scale=1.0;
maximum-scale=1.0; user-scalable=no;" />
これはうまくいきませんでした。以下は、私が現在使用しているFlexコードです。
<?xml version="1.0" encoding="utf-8"?>
<fx:Script>
<![CDATA[
import flash.media.StageWebView;
import flash.net.URLRequest;
import spark.events.ViewNavigatorEvent;
protected var webView:StageWebView = new StageWebView();
protected var openBrowser:Boolean = false;
protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void
{
if (StageWebView.isSupported)
{
currentState = "normal";
webView.stage = stage;
webView.viewPort = new Rectangle(0,75,stage.stageWidth,stage.stageHeight);
webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onURLChange);
webView.loadURL("http://nealdrake.com/mls.html");
addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
}
else {
currentState = "unsupported";
lblSupport.text = "StageWebView feature not supported";
}
}
protected function onURLChange(event:LocationChangeEvent):void
{
trace("URL change");
// Uncomment the following line to load in the default browser instead...
//navigateToURL(new URLRequest(event.location));
}
protected function onRemove(event:ViewNavigatorEvent):void
{
this.webView.dispose();
}
]]>
</fx:Script>
<s:states>
<s:State name="normal"/>
<s:State name="unsupported"/>
</s:states>
<s:Label id="lblSupport" includeIn="unsupported" width="95%" horizontalCenter="0" verticalCenter="0"/>
どんな助けでも大歓迎です!