Hi, everytime i try to change the code of my event, nothing happends. If i write something, for example displaying an image.
I will put my code below, my problem is down at the bottom of the code, keep scrolling down until you see the bold text.
local composer = require(“composer”)
local scene = composer.newScene()
function scene:create(event)
local sceneGroup = self.view
local function Button2Copy(event)
function back(event)
composer.gotoScene(“socialscene”)
end
local function s21e(event)
if ( “began” == event.phase ) then
local black = display.newImage(“black.png”)
black.x = display.contentCenterX
black.y = display.contentCenterY
local soc = display.newImage(“social7.png”)
soc.x = display.contentCenterX
soc.y = display.contentCenterY
soc.height = 1000
soc.width = 1428
end
end
local widget = require(“widget”)
s21 = widget.newButton(
{
width = 582,
height = 413,
defaultFile = “social6back.png”,
overFile= “social6back.png”,
onEvent = s21e
}
)
– Center the button
s21.x = display.contentCenterX - 610
s21.y = display.contentCenterY - 230
____________________________________________________________________________________
It’s down here that removing or adding code and saving dosen’t do anything when you run the app, except if you write something that won’t work then you get an error
local function s31(event)
if ( “began” == event.phase ) then
local black2 = display.newImage(“black.png”)
black2.x = display.contentCenterX
black2.y = display.contentCenterY
local soc2 = display.newImage(“social8.png”)
soc2.x = display.contentCenterX
soc2.y = display.contentCenterY
soc2.height = 1000
soc2.width = 1428
local widget = require(“widget”)
back = widget.newButton(
{
width = 250,
height = 50,
defaultFile = “backpick.png”,
overFile= “backpick.png”,
onEvent = back
}
)
– Center the button
back.x = display.contentCenterX
back.y = display.contentCenterY
end
end
_____________________________________________________________________________________