Hey Rob , here is the entire Menu Lua file
local composer = require( "composer" ) local scene = composer.newScene() local myData = require( "mydata" ) local json = require( "json" ) local loadsave = require( "loadsave" ) display.setStatusBar(display.HiddenStatusBar) ads = require( "ads" ) local MainMusicGameMenu = audio.loadStream ("Main.ogg") local widget = require( "widget" ) local popupName = "social" -- -------------------------------------k---------------------------------------------------------------------------- -- All code outside of the listener functions will only be executed ONCE unless "composer.removeScene()" is called. -- ----------------------------------------------------------------------------------------------------------------- local PlayGameButton local CreditsButton local SettingsButton local WriteScoreTemp local WriteScore local score local options = { effect = "fade", time = 100, } local centerX = display.contentCenterX local centerY = display.contentCenterY local screenLeft = display.screenOriginX local screenWidth = display.contentWidth - screenLeft \* 2 local screenRight = screenLeft + screenWidth local screenTop = display.screenOriginY local screenHeight = display.contentHeight - screenTop \* 2 local screenBottom = screenTop + screenHeight local sequences\_animatedSettings = { -- consecutive frames sequence { name = "Grey", frames = {1,2}, time = 4000, loopCount = 1, loopDirection = "forward" }, } local sheetOptionsSettings = { width = 154, height = 50, numFrames = 2 } local sequences\_animatedCredits = { -- consecutive frames sequence { name = "Grey", frames = {1,2}, time = 3000, loopCount = 1, loopDirection = "forward" }, } local sheetOptionsCredits = { width = 170, height = 55, numFrames = 2 } local sequences\_animatedPlay = { -- consecutive frames sequence { name = "Grey", frames = {1,2}, time = 2000, loopCount = 0, loopDirection = "forward" }, } local sheetOptionsPlay = { width = 170, height = 90, numFrames = 2 } local function PlayGameButtonF (event) composer.gotoScene ("levelselect", options) return true -- body end local function CreditsButtonF (event) composer.gotoScene ("Credits", {effect="slideDown"}) return true -- bodyر end local function SettingsButtonF (event) composer.gotoScene ("Settings", {effect="slideUp"}) return true -- body end -- ------------------------------------------------------------------------------- -- "scene:create()" function scene:create( event ) local sceneGroup = self.view local widget = require( "widget" ) -- Use the iOS 7 theme for this sample widget.setTheme( "widget\_theme\_ios7" ) -- This is the name of the native popup to show, in this case we are showing the "social" popup local popupName = "social" local myData = require( "mydata" ) -- Initialize the scene here. -- Example: add display to "sceneGroup", add touch listeners, etc. score = 0 myData.settings = loadsave.loadTable( "settings.json" ) local ScoreToShareNO = myData.settings.HighScore local StarsToShareNO = myData.settings.levels local ScoreToShareStr= tostring(ScoreToShareNO) local StarsToShareStr= tostring(StarsToShareNO) local background1 = display.newImage (sceneGroup,"Menu3.jpg") background1.x = centerX background1.y = centerY-10 background1:toBack(); local sheet\_animatedPlay = graphics.newImageSheet( "PlayGlow.png", sheetOptionsPlay ) local PlayGameButton = display.newSprite( sheet\_animatedPlay, sequences\_animatedPlay ); PlayGameButton.x=centerX PlayGameButton.y=centerY+10 PlayGameButton:play() sceneGroup:insert(PlayGameButton) PlayGameButton:addEventListener("tap", PlayGameButtonF ) local sheet\_animatedSettings = graphics.newImageSheet( "SettingGlow.png", sheetOptionsSettings ) local SettingsButton = display.newSprite( sheet\_animatedSettings, sequences\_animatedSettings ); SettingsButton.x=centerX SettingsButton.y=centerY+80 --SettingsButton:play() sceneGroup:insert(SettingsButton) SettingsButton:addEventListener("tap", SettingsButtonF ) local sheet\_animatedCredits = graphics.newImageSheet( "CreditsGlow.png", sheetOptionsCredits ) local SettingsButton = display.newSprite( sheet\_animatedCredits, sequences\_animatedCredits ); SettingsButton.x=centerX SettingsButton.y=centerY+140 sceneGroup:insert(SettingsButton) SettingsButton:addEventListener("tap", CreditsButtonF ) local function onShareButtonReleased( event ) local serviceName = event.target.id local isAvailable = native.canShowPopup( popupName, serviceName ) local options = {} options.service = serviceName options.listener = listener options.message = { "Share this game your friends!, and check my Stars: " .. StarsToShareStr .. " and Score: " .. ScoreToShareStr } options.url = { "http://www.coronalabs.com" } options.image = { { filename = "Icon-xhdpi.png", baseDir = system.ResourceDirectory }, } native.showPopup( popupName, options ) print(ScoreToShareStr) end local ShareOnly = display.newImage (sceneGroup,"share.png") ShareOnly.x = centerX+10 ShareOnly.y = centerY+210 ShareOnly:addEventListener("tap", onShareButtonReleased) end -- "scene:show()" function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then if audio.isChannelPaused( 1 ) then audio.resume( { channel=1} ) end if myData.settings.musicOn == true then playMusic = audio.play (MainMusicGameMenu, { channel=1, loops=-1, fadein=3000 } ) elseif myData.settings.musicOn == false then end -- Called when the scene is still off screen (but is about to come on screen). elseif ( phase == "did" ) then -- Called when the scene is now on screen. -- Insert code here to make the scene come alive. -- Example: start timers, begin animation, play audio, etc. end end -- "scene:hide()" function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Called when the scene is on screen (but is about to go off screen). -- Insert code here to "pause" the scene. -- Example: stop timers, stop animation, stop audio, etc. elseif ( phase == "did" ) then -- Called immediately after scene goes off screen. end end -- "scene:destroy()" function scene:destroy( event ) local sceneGroup = self.view --audio.pause() -- Called prior to the removal of scene's view ("sceneGroup"). -- Insert code here to clean up the scene. -- Example: remove display , save state, etc. --sceneGroup.remove(PlayGameButton) --sceneGroup.remove(CreditsButton) --sceneGroup.remove(SettingsButton) --composer.removeScene("menu",true) end -- ------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) -- ------------------------------------------------------------------------------- return scene