Fix possible double-start, or premature start, on Flash

This commit is contained in:
Joshua Granick
2017-01-25 11:03:30 -08:00
parent 9878594376
commit 80ff66fddf

View File

@@ -35,7 +35,7 @@ import flash.Lib;
class Preloader #if flash extends Sprite #end {
public var complete:Bool;
public var complete (default, null):Bool;
public var onComplete = new Event<Void->Void> ();
public var onProgress = new Event<Int->Int->Void> ();
@@ -204,6 +204,8 @@ class Preloader #if flash extends Sprite #end {
private function start ():Void {
if (complete) return;
complete = true;
#if flash
@@ -350,7 +352,7 @@ class Preloader #if flash extends Sprite #end {
private function loaderInfo_onComplete (event:flash.events.Event):Void {
loadedStage = true;
//loadedStage = true;
if (bytesTotalCache["_root"] > 0) {