Quick Screen Flicker When Changing Scenes?

Hey everyone,

I'm having some problems with a quick black screen that flickers between scenes. This only appears when I use a timer that calls a function to switch scenes. It also happens when I use the onComplete parameter in a transition. If I normally call the changeScene function, then there's no flicker.

Any solutions to this problem?

Ok I have some fixes for you that worked for me.

First if you are loading a decent sized movie clip (~10+ frames) it make take a few milliseconds and show up where it loads while changing scene, because you can't set x or y or visibility beforehand I suggest directly after loading it do .isVisible=false it seemed to fix the problem. Go to a point where you know everything should be loaded and set isVisible=true. This fixed my "flash" of seeing images.

A trick to solve a bunch of issues is to create a display group with a loading image as global in your main.lua file, set .isVisible to true and right before returning a display group in each scene change isVisible to false, at the same time right before changing scene reset is Visible to true. Within each scene set the group you are returning to isVisible = false right after you make it, and right before returning it and before you set you loading image to isVisible = false set the new scene group to be visible. You could even set up a ~100ms timer so load times appear consistent and you end up with a nice loading image. Even more tricky is you could set the loading image as a movie clip and scroll thru what would appear to be a loading bar each time a scene is changed.

This second trick requires adding assets to the scene group right after you create them btw if you wait more then a few lines they will flash on the screen as with the first movie clip example. You probably notice there is almost no flash if you don't load many images.

Hope this helps

views:1536 update:2011/10/12 18:33:00
corona forums © 2003-2011