in some cases nextFrame() doesn't work right away and you get an enterframe. Basictests was suffering from this. So we added more attempts to change the frame
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/95457ebb Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/95457ebb Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/95457ebb Branch: refs/heads/feature/mdl Commit: 95457ebbc2c204891a355dceab8d2c238ec59587 Parents: 1cb8e19 Author: Alex Harui <aha...@apache.org> Authored: Thu Nov 10 22:49:10 2016 -0800 Committer: Alex Harui <aha...@apache.org> Committed: Thu Nov 10 22:50:53 2016 -0800 ---------------------------------------------------------------------- .../flex/org/apache/flex/core/ApplicationFactory.as | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/95457ebb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationFactory.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationFactory.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationFactory.as index 0b75d6c..d34cdd8 100644 --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationFactory.as +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationFactory.as @@ -68,22 +68,26 @@ package org.apache.flex.core } private function deferredFrameHandler(e:flash.events.Event):void - { - removeEventListener(flash.events.Event.ENTER_FRAME, deferredFrameHandler); - + { var mainClassName:String = info()["mainClassName"]; var app:ISWFApplication = create() as ISWFApplication; if (app) - app.setRoot(this); + { + removeEventListener(flash.events.Event.ENTER_FRAME, deferredFrameHandler); + app.setRoot(this); + } + else if (currentFrame == 1) + nextFrame(); } + private var _info:Object = {}; /** * @private */ public function info():Object { - return {}; + return _info; } /**