Here is my first page:
[lua]module(…, package.seeall)
–Change Scene Required For Switching Pages
–Start Scene
function new()
local Scene = display.newGroup();
–Document Settings
local _W = display.contentWidth
local _H = display.contentHeight
–List of sprites
function Light_Blue(params);
R1 = sprite.newSpriteSheet( “sprites/LightBlue_Row1.png”, 480, 854 )
R1:play()
R2 = sprite.newSpriteSheet( “sprites/LightBlue_Row2.png”, 480, 854 )
R2:play()
R3 = sprite.newSpriteSheet( “sprites/LightBlue_Row3.png”, 480, 854 )
R3:play()
R4 = sprite.newSpriteSheet( “sprites/LightBlue_Row4.png”, 480, 854 )
R4:play()
end
–End of list
–Assets for Scene Group
–*must return all assets whether they are in the group or not*
Scene:insert(R1);
Scene:insert(R2);
Scene:insert(R3);
Scene:insert(R4);
Scene:insert(Light_Blue);
–Event Listeners for Scene Group
return Scene;
end
–End Scene Group[/lua]
All I’m doing is calling the sprites and then telling them to play within 1 function.
Here’s my main page:
[lua]module(…, package.seeall)
–Change Scene Required For Switching Pages
–Start Scene
function new()
local Scene = display.newGroup();
–Document Settings
local _W = display.contentWidth
local _H = display.contentHeight
local background = display.newImage(“Renders/Levels/Level_1.png”)
local Game_Pieces = require(Game_Pieces);
local 1st_Level = Game_Pieces.Light_Blue
–Assets for Scene Group
–*must return all assets whether they are in the group or not*
Scene:insert(background);
Scene:insert(1st_Level);
–Event Listeners for Scene Group
return Scene;
end
–End Scene Group[/lua]
I’m new. How do I load all my sprites into 1 module. Tell them to play together and at random. Then load that information into another module? This code is just to play it but it doesn’t seem to work. What am I doing wrong? [import]uid: 77916 topic_id: 12887 reply_id: 312887[/import]