I NEED HELP (pls)

@Killer.Jo - just think about the demo with the buttons I posted. For the moment don’t use CurrentTouch - use the function touched(t) function to capture touches to the screen. Also you have definitions in Draw() that should be defined once not every time you run Draw(). Changing values in Draw() is OK to establish change but use Setup() to initialise them.
At an early stage of learning set up your project with Seup(), Draw() and Touched() in.

I’ll try to do this on my PC now so I don’t know how it will run - here goes:


function setup()
    --
    txt9 = "Ronaldo"
    txt10 = "I am scrn 2 !"
    scrn = "first"
end

function draw()
    -- 
    if scrn == "first" then
        background(118, 171, 226)
    else
        background(76, 255, 0)
        scrn = txt10
    end
    fill(255, 0, 13)
    fontSize(32)
    font("Arial-BoldItalicMT")
    text(txt10,500,500)

end

function touched(t)
    --
    if t.state == ENDED then
        if t.pos.x >= 450 and t.pos.x <= 600 then
            if t.pos.y >= 450 and t.pos.y <= 600 then
                if scrn == "first" then
                    scrn = txt10
                else
                    scrn = "first"
                end
            end
        end
    end
end

Edit: Mistakes in first stab at this, trying to run something in parallel. Is this OK ?

Edit: posted up working as I thought you wanted.