Just try this code in windows player or windows exported exe. After you
focus out player and then return focus back to player,
it goes hang and has glitches, you can try to push play button and it wouldnt work (because player gets hanget).
The problem seems render cant find active application and crashes.
Fortunately, this not happens on Android exported apk.application:setBackgroundColor<span class="br0">(</span>0x000000<span class="br0">)</span>
<span class="kw1">function</span> getScreenShot<span class="br0">(</span><span class="br0">)</span>
<span class="kw1">local</span> screenShotRender <span class="sy0">=</span> RenderTarget.new<span class="br0">(</span><span class="nu0">940</span>, <span class="nu0">560</span><span class="br0">)</span>
screenShotRender:draw<span class="br0">(</span>stage<span class="br0">)</span>
<span class="kw1">local</span> screenShot <span class="sy0">=</span> Bitmap.new<span class="br0">(</span>screenShotRender<span class="br0">)</span>
screenShot:setColorTransform<span class="br0">(</span><span class="nu0">0.3</span>, <span class="nu0">0.3</span>, <span class="nu0">0.3</span>, <span class="nu0">1</span><span class="br0">)</span>
<span class="kw1">return</span> screenShot
<span class="kw1">end</span>
stage:addEventListener<span class="br0">(</span>Event.APPLICATION_SUSPEND, getScreenShot, self<span class="br0">)</span>
stage:addEventListener<span class="br0">(</span>Event.ENTER_FRAME, <span class="kw1">function</span><span class="br0">(</span><span class="br0">)</span>
<span class="kw1">if</span> stage.text <span class="kw1">then</span>
stage.text:removeFromParent<span class="br0">(</span><span class="br0">)</span>
<span class="kw1">end</span>
stage.text <span class="sy0">=</span> TextFiel |
|
Comments
Likes: keszegh, Apollo14, SinisterSoft, antix
Waiting for your fix )
Likes: Apollo14, Yan