diff --git a/src/lime/_internal/backend/flash/FlashWindow.hx b/src/lime/_internal/backend/flash/FlashWindow.hx index c07bf6c98..579922f0b 100644 --- a/src/lime/_internal/backend/flash/FlashWindow.hx +++ b/src/lime/_internal/backend/flash/FlashWindow.hx @@ -206,7 +206,7 @@ class FlashWindow { }; - if (Reflect.hasField (attributes, "context") && Reflect.hasField (attributes.context, "background")) { + if (Reflect.hasField (attributes, "context") && Reflect.hasField (attributes.context, "background") && attributes.context.background != null) { stage.color = attributes.context.background; contextAttributes.background = stage.color; diff --git a/templates/haxe/ApplicationMain.hx b/templates/haxe/ApplicationMain.hx index 06d1ee2b8..d0817a287 100644 --- a/templates/haxe/ApplicationMain.hx +++ b/templates/haxe/ApplicationMain.hx @@ -33,6 +33,11 @@ import ::APP_MAIN::; app.meta.set ("name", "::meta.title::"); app.meta.set ("packageName", "::meta.packageName::"); + #if (flash && !air) + app.window.context.attributes.background = ::WIN_BACKGROUND::; + app.window.frameRate = ::WIN_FPS::; + #else + ::foreach windows:: var attributes:lime.ui.WindowAttributes = { @@ -98,6 +103,7 @@ import ::APP_MAIN::; app.createWindow (attributes); ::end:: #end + #end // preloader.create ();