need help with video splash screen

Hi all,

Once again I am coming cap in hand for some advice, I am trying to get a splash screen working, but it is animated. Can somebody please look at this and give me some guidance please please please???

local movieclip = require("movieclip")  
  
-- Main function - MUST return a display.newGroup()  
function new()  
 local localGroup = display.newGroup()  
  
 local theTimer  
 local myAnim  
  
 local showLoadingScreen = function()   
 myAnim = movieclip.newAnim{ "001.png", "002.png","003.png","004.png","005.png","006.png","007.png","008.png","009.png","010.png",}  
 myAnim.x = 0  
 myAnim.y = 0  
 myAnim:play()  
 localGroup:insert(myAnim)  
  
 local goToLevel = function()  
 director:changeScene( "menu" )  
 end  
  
 theTimer = timer.performWithDelay( 5000, goToLevel, 1 )  
 end  
  
 showLoadingScreen()  
  
 unloadMe = function()  
 end  
  
 -- MUST return a display.newGroup()  
 return localGroup  
end  

thank you so much, I am not been lazy but can not understand why it does not work
Chris [import]uid: 7388 topic_id: 5612 reply_id: 305612[/import]

What do you mean “it does not work”?
Do you mean you can’t see your animation?
It’s practically invisible at 0,0.
Do you mean nothing happens?
Where is this code in the scheme of things? Who is calling new()?
The more information you give in your post, the more likely you are to get a (relevant) response. [import]uid: 12635 topic_id: 5612 reply_id: 19125[/import]

thank you for your kind words EdwardK,

ok then all I get is a black screen so no animation shows, and ater 5 seconds ot does not move to the menu screen.

I tried the x and y at 180 260 but the same result.

and new is being called by the main.lua

Many thanks
Chris [import]uid: 7388 topic_id: 5612 reply_id: 19185[/import]

still can not get this to work, I have the movieclip.lua in my project file, the code look good from what I can see.

Maybe it would be better if I created video and used media.playVideo function?

All I am trying to create is a ten second animated splash screen

Any thoughts
Thanks
Chris [import]uid: 7388 topic_id: 5612 reply_id: 19307[/import]

Are you calling new() ? [import]uid: 7202 topic_id: 5612 reply_id: 19506[/import]

I think so, I’m calling it in main.lua

But now I am doubting it, I am not at my computer at the moment so can not check, can I call new() in the main file or is it easier to call new() in this file???

Many thanks
Chris [import]uid: 7388 topic_id: 5612 reply_id: 19525[/import]

Hi all,

So I have been working with lua for about a month now and thought I had it cracked, now I am doubting it.

The problem I have is the code works when I just use an newImage, but as soon as I try with an animation it breaks.

I have posted my main.lua and loadmenu.lua here please help

local physics = require("physics")  
 physics.start()  
 physics.setGravity(0,0.08)  
  
local director = require("director")  
local mainGroup = display.newGroup()  
  
local function main()  
 mainGroup:insert(director.directorView)  
 director:changeScene("loadmenu")   
 return true  
end  
  
main()  
module(..., package.seeall)  
local movieclip = require("movieclip")  
function new()  
 local localGroup = display.newGroup()  
  
 local theTimer  
 local myAnim  
  
 local showLoadingScreen = function()  
 myAnim = movieclip.newAnim{ "001.png", "002.png","003.png","004.png","005.png","006.png","007.png","008.png","009.png","010.png",}  
 myAnim.x = 80  
 myAnim.y = 260  
 myAnim:play()  
 localGroup:insert(myAnim)  
  
 local goToLevel = function()  
 director:changeScene( "menu" )  
 end  
  
 theTimer = timer.performWithDelay( 5000, goToLevel, 1 )  
 end  
  
 showLoadingScreen()  
  
 unloadMe = function()  
 if theTimer then timer.cancel( theTimer ); end  
  
 if myAnim then  
 myAnim:removeSelf()  
 myAnim = nil  
 end  
 end  
  
 -- MUST return a display.newGroup()  
 return localGroup  
end  

Thanks Chris [import]uid: 7388 topic_id: 5612 reply_id: 19690[/import]

I have sorted it, I thought it would be be easy. All it was that I did not put the image size in. DOH…

myAnim = movieclip.newAnim({ "001.png","002.png","003.png","004.png","005.png","006.png","007.png","008.png","009.png","010.png" },320,480)  

thanks
Chris [import]uid: 7388 topic_id: 5612 reply_id: 19693[/import]