Composer

hey all,

i have a bit of code thats works fine when its not integrated with composer but when i put it in composer o get a black screen (no errors). I know its a lot of code to wade through but i think im missing something simple.

local composer = require( "composer" ) local scene = composer.newScene() --------------------------------------------------------------------------------- -- All code outside of the listener functions will only be executed ONCE -- unless "composer.removeScene()" is called. --------------------------------------------------------------------------------- -- local forward references should go here display.setStatusBar( display.HiddenStatusBar ) local W = display.viewableContentWidth local H = display.viewableContentHeight local X = display.contentCenterX local Y = display.contentCenterY local XO = display.screenOriginX local random = math.random --------------------------------------------------------------------------------- -- "scene:create()" function scene:create( event ) &nbsp;&nbsp; local sceneGroup = self.view &nbsp;&nbsp; local background = display.newImage("background3.png") &nbsp;&nbsp; sceneGroup:insert( background) &nbsp;&nbsp; background.anchorX = .5 &nbsp;&nbsp; background.anchorY = .5 &nbsp;&nbsp; background.x = X &nbsp;&nbsp; background.y = Y &nbsp;&nbsp; local sun = display.newImage("sun.png") &nbsp;&nbsp; transition.to( sun, {time = 100000, x = W} ) &nbsp;&nbsp; local buildbutton = display.newImage("BuildButtonM.png") &nbsp;&nbsp; sceneGroup:insert(sun) &nbsp;&nbsp; sceneGroup:insert(buildbutton) &nbsp;&nbsp; buildbutton.x = W \* .9 &nbsp;&nbsp; buildbutton.y = H \* .88 &nbsp;&nbsp; local function BuildCLoud (params)&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local Ypos = random(30,Y) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local cloud = display.newImage(params.image ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sceneGroup:insert(cloud) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cloud.anchorX = 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cloud.x = W &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cloud.y = Ypos &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cloud.speed = params.speed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return cloud &nbsp;&nbsp; end &nbsp;&nbsp; local params = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {image = "Cloud1.png", speed = .5}, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {image = "Cloud2.png", speed = .2}, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {image = "Cloud3.png", speed = .3}, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {image = "clouds4.png", speed = .3}, &nbsp;&nbsp; } &nbsp;&nbsp; local cloudtable = {} &nbsp;&nbsp; for \_,item in ipairs( params ) do &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local ball = BuildCLoud( item ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cloudtable[#cloudtable+1] = ball &nbsp;&nbsp; end &nbsp;&nbsp; local function MoveClouds (event) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for \_,ball in ipairs( cloudtable ) do &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ball.x \<= XO - ball.width then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print( "reached" ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ball.x = W &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ball.y = random (30, Y) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ball.speed = random (2,5)\*.1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ball:translate( -ball.speed, 0 ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end &nbsp;&nbsp; end &nbsp;&nbsp; -- Initialize the scene here. &nbsp;&nbsp; -- Example: add display objects to "sceneGroup", add touch listeners, etc. buildbutton:addEventListener( "touch", ToShop ) Runtime:addEventListener( "enterFrame", MoveClouds ) &nbsp;&nbsp; -- Initialize the scene here. &nbsp;&nbsp; -- Example: add display objects to "sceneGroup", add touch listeners, etc. end --------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) --------------------------------------------------------------------------------- return scene &nbsp;