{"action":"closed","issue":{"url":"https://api.github.com/repos/openfl/openfl/issues/728","labels_url":"https://api.github.com/repos/openfl/openfl/issues/728/labels{/name}","comments_url":"https://api.github.com/repos/openfl/openfl/issues/728/comments","events_url":"https://api.github.com/repos/openfl/openfl/issues/728/events","html_url":"https://github.com/openfl/openfl/issues/728","id":91637390,"number":728,"title":"Event Listener blocking problem","user":{"login":"Hasufel","id":794571,"avatar_url":"https://avatars.githubusercontent.com/u/794571?v=3","gravatar_id":"","url":"https://api.github.com/users/Hasufel","html_url":"https://github.com/Hasufel","followers_url":"https://api.github.com/users/Hasufel/followers","following_url":"https://api.github.com/users/Hasufel/following{/other_user}","gists_url":"https://api.github.com/users/Hasufel/gists{/gist_id}","starred_url":"https://api.github.com/users/Hasufel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hasufel/subscriptions","organizations_url":"https://api.github.com/users/Hasufel/orgs","repos_url":"https://api.github.com/users/Hasufel/repos","events_url":"https://api.github.com/users/Hasufel/events{/privacy}","received_events_url":"https://api.github.com/users/Hasufel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-28T20:37:03Z","updated_at":"2015-06-29T14:01:52Z","closed_at":"2015-06-29T14:01:52Z","body":"In -next from dev (native, neko) and haxelib version (lime/openfl), with this simple following code:\r\n```\r\npackage;\r\n\r\nimport flash.events.Event;\r\nimport flash.Lib;\r\n\r\nclass EventProblem {\r\n    private var _c:Int=0;\r\n\t\r\n\tpublic function new() {\r\n\t\thaxe.Timer.delay(init,100);\r\n\t}\r\n\r\n\tprivate function init():Void {\r\n        //Lib.current.stage.addEventListener(Event.DEACTIVATE, deactivateListener);\r\n        Lib.current.stage.addEventListener(Event.RESIZE, resizeListener);\r\n        Lib.current.stage.addEventListener(Event.ENTER_FRAME, runLoop);\r\n\t}\r\n\r\n    private function resizeListener(e:Event):Void {\r\n\r\n    }\r\n\r\n    private function deactivateListener(e:Event):Void {\r\n\r\n    }\r\n\r\n\tprivate function runLoop(e:Event):Void {\r\n        trace (\"pass \" + (_c++));\r\n        Lib.current.stage.removeEventListener(Event.ENTER_FRAME, runLoop);\r\n        Lib.current.stage.addEventListener(Event.ENTER_FRAME, runLoop);\r\n    }\r\n\r\n\tstatic public function main() {\r\n\t\tnew EventProblem();\r\n\t}\r\n\r\n}\r\n```\r\n\r\nEither adding\r\n```Lib.current.stage.addEventListener(Event.RESIZE, resizeListener);```\r\nor \r\n```Lib.current.stage.addEventListener(Event.DEACTIVATE, deactivateListener);```\r\nbefore\r\n```Lib.current.stage.addEventListener(Event.ENTER_FRAME, runLoop);```\r\nwill prevent the second\r\n```Lib.current.stage.addEventListener(Event.ENTER_FRAME, runLoop);```\r\nto be operative in runLoop(), resulting in an abnormal halt of operations.\r\n\r\nOther event listeners than resize, deactivate, added prior to an enterframe would likely bring a similar problem.\r\nLegacy does not have this problem."}}