Due to early Storyboard instability, I have stuck with director.lua for scene changes. Implementing G2.0 has introduced the following problems:
- fade in/out of a black rectangle in upper-left-screen quadrant on opening any lua file (module)
2) a broken video (mov) changeScene transition
Re: broken video
On changeScene to open/close intro.lua, specified fade effect is ignored and replaced by slide effect – sliding the wrong screen.
A] On open intro.lua, current screen slidesDown, reveals black bg w/mov controls, intro.lua bg appears
B] On close intro.lua, the pre-intro-legacy screen (from A open ) slides up, disappears, reveals menu.lua bg
I’ll include intro.lua and sample changeScene code below.
I have tried every iteration that I can think of. Any thoughts/suggestions for what I can try to fix either of these problems? Thank you very much for any help that you can give.
—————[ intro.lua code ]————————
[lua]
–intro.lua - plays intro.mov returns to main screen (menu.lua) when movie ends or user selects movie player controls’ “Done” button
module(…, package.seeall);
function new()
local localGroup = display.newGroup();
local bg = display.newImage( “images/bgmov.png” )
local movie = “media/intro.mov”;
– CHANGE SCENE
local changeScene = function ( e )
localGroup:remove(movie)
director:changeScene( “menu” , “fade” )
end
tmr = timer.performWithDelay(1500, changeScene , 1)
– PLAY VIDEO
– Determine if running on Corona Simulator
local isSimulator = “simulator” == system.getInfo(“environment”)
– Video is not supported on Simulator
if isSimulator then
display.newText( “No Video on Simulator!”, 0, 60, “Verdana-Bold”, 22 )
else
media.playVideo( “media/intro.mov”, true, changeScene );
end
localGroup:insert(bg);
return localGroup;
end
[/lua]
—————[ puzzle.lua’s changeScene code - works with every other lua module]————————
[lua]
–***************************************************
–********* CHANGESCENE ***************************
–***************************************************
function changeScene(e)
if(e.phase == “ended”) then
for i = localGroup.numChildren, 1, -1 do–traversing puzz backward
localGroup[i]:removeSelf();
localGroup[i] = nil;
end
director:changeScene(e.target.scene, “fade”);
end
end
[/lua]