From 42b8ce9938a98251b8c4325da783b3442ec2fc61 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Thu, 13 Apr 2017 10:04:29 -0700 Subject: [PATCH] Help: added removeEventListener() call to sample custom bootstrap for SDK --- .../help/markdown/sdk/custom-starling-initialization.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/documentation/help/markdown/sdk/custom-starling-initialization.md b/documentation/help/markdown/sdk/custom-starling-initialization.md index 3aa36ed371..a144826a65 100644 --- a/documentation/help/markdown/sdk/custom-starling-initialization.md +++ b/documentation/help/markdown/sdk/custom-starling-initialization.md @@ -49,6 +49,9 @@ package com.example private function starling_context3DCreateHandler( event:Event ):void { + //this listener shouldn't be called again if context is lost + this._starling.removeEventListener( Event.CONTEXT3D_CREATE, starling_context3DCreateHandler ); + // the context is ready, so the theme can create its textures new MetalWorksMobileTheme();