composer.loadScene acts like composer.gotoScene

Hello,

first of all, I am an absolute beginner at Corona, so I guess, I just ran into some newbie-problems.

Here is the issue:

Because I am loading quite a few images in a scene:create-function, my app simply does not manage to display a scene transition while loading, placing and resizing those images within a for loop.

So my solution is, to load the scene in my “main-lua”, then entering a “menue.lua” from where I finally can enter my image-heavy “ownstory.lua”.

The problem is, instead of just loading the “ownstory.lua”, the app seems to enter (or just display) the “ownstory.lua”.

Simplyfied code:

main.lua:

local composer = require("composer") composer.loadScene("ownstory", false) composer.gotoScene("menue", {effect = "fade", time = 500})

because my “menue.lua” works pretty well, I jump directly into my “ownstory.lua”:

local composer = require( "composer" ) local scene = composer.newScene() -- variables for placing and resizing images local x\_count = display.screenOriginX local y\_count = 0 local tilecount = 3 -- variable to access images local img = {} -- loading images for n = 1, 26, 1 do local path = system.pathForFile( "img/tile\_" .. n .. ".png", system.ResourceDirectory ) if path ~= nil then print( "File exists" ) img[n] = display.newImage("img/tile\_" .. n .. ".png") else print( "File does not exist!" ) end end function scene:create( event ) local sceneGroup = self.view -- placing and resizing images for n = 1, 26, 1 do img[n].width = display.actualContentWidth/tilecount img[n].height = display.actualContentWidth/tilecount img[n].anchorY = 0 img[n].anchorX = 0 img[n].x = x\_count img[n].y = y\_count sceneGroup:insert(img[n]) x\_count = x\_count + display.actualContentWidth/tilecount if x\_count \>= display.actualContentWidth then x\_count = display.screenOriginX y\_count = y\_count + display.actualContentWidth/tilecount end end end 

I thought the composer.loadScene-function loads and hides the scene in the background - but somehow it displays the whole scene in the foreground.

Any ideas?

PS: In the simulator (Windows) everything runs fine, but as soon as I test on my Android phone, the trouble begins…