persistNavigatorState = "true"とstage.setAspectRatio(StageAspectRatio.PORTRIT)を一緒に使用してプログラムを初期化できないのはなぜですか?Flex MobileなぜpersistNavigatorState = "true"で、stage.setAspectRatio(StageAspectRatio.PORTRAIT)は混在しませんか?
<s:View ...creationComplete="init()">
保護された関数init():ボイド{
stage.setAspectRatio(StageAspectRatio.PORTRAIT)。
}
[SWF] Main.swf - 3,394,828 bytes after decompression
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at views::Try01/init()[C:\Users\James\Adobe Flash Builder 4.5\myProgram\src\views\Try01.mxml:19]
at views::Try01/___Try01_View1_creationComplete()[C:\Users\James\Adobe Flash Builder 4.5\myProgram\src\views\Try01.mxml:4]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
at mx.core::UIComponent/set initialized()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:1818]
at mx.managers::LayoutManager/validateClient()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1090]
at mx.core::UIComponent/validateNow()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:8067]
at spark.components::ViewNavigator/commitNavigatorAction()[E:\dev\4.5.1\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1878]
at spark.components::ViewNavigator/commitProperties()[E:\dev\4.5.1\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1236]
at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:8209]
at mx.managers::LayoutManager/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:783]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]
私はpersistNavigatorStateを有効にするたびに、私のプログラムは実行されません。両方を一緒に使用する方法はありますか?おかげ
[ライン4] creationComplete="init()"
protected function init():void {
[Line 19] stage.setAspectRatio(StageAspectRatio.PORTRAIT);
}
あなたが "逃げない" とはどういう意味ですか?間違いはありますか?または、アプリケーションが読み込まれませんか?それとも、ロードしてすぐにクラッシュするのですか?どのプラットフォームをターゲットにしていますか?ビヘイビアはエミュレータまたはデバイスに存在しますか? – JeffryHouser
モバイルエミュレータで動作していますが、エラーが多く、エミュレータがハングアップしても、デバイスを試すためのイベントを構築できません。あなたがエラーを知りたければ、私に知らせて、私はそれを投稿します。 (FB 4.5.1を使用) – jameslcs
エミュレータとの問題がたくさんあります。しかし、あなたが漠然とした方向性を求めているなら、エラーを投稿する必要があります。 – JeffryHouser