A better explanation of the question is below.
My apologies in advance for having to download 4 images to see my example.
function setup()
displayMode(FULLSCREEN)
--sprites
--Top Left
imageName = asset.documents.Dropbox.Red_Info_Button
imageSize = spriteSize(imageName)
scaler = .50
x,y=WIDTH*.81+5,HEIGHT*.44-3
--Bottom Left
imageName2 = asset.documents.Dropbox.Teal_Info_Button
imageSize2 = spriteSize(imageName2)
scaler2 = .50
x2,y2=WIDTH*.81+5,HEIGHT*.35-4
--Top Right
imageName4 = asset.documents.Dropbox.Yellow_Info_Button
imageSize4 = spriteSize(imageName4)
scaler4 = .50
x4,y4=WIDTH*.88-1,HEIGHT*.44-3
--Bottom Right
imageName5 = asset.documents.Dropbox.Blue_Info_Button
imageSize5 = spriteSize(imageName5)
scaler5 = .50
x5,y5=WIDTH*.88-1,HEIGHT*.35-4
end
function draw()
background(98)
strokeWidth(5)
fill(128)
--big ellipses that are numbered
--#1
ellipse(320, 290, 110)
--#2
ellipse(445, 290, 110)
--#3
ellipse(570, 290, 110)
--#4
ellipse(695, 290, 110)
--small ellipses
--top left
ellipse(835, 335, 55)
--bottom left
ellipse(835, 265, 55)
--top right
ellipse(900, 335, 55)
--bottom left
ellipse(900, 265, 55)
fill(0)
fontSize(60)
text("1", 320, 300 )
text("2", 450, 300 )
text("3", 570, 300 )
text("4", 695, 300 )
strokeWidth(5)
--Sprite
sprite(imageName,x,y,scaler*imageSize)
sprite(imageName2,x2,y2,scaler2*imageSize2)
sprite(imageName4,x4,y4,scaler4*imageSize4)
sprite(imageName5,x5,y5,scaler5*imageSize5)
end
function touched(touch)
--Sprites
--Top Left
if touch.state==BEGAN then
if touch.x>x-20 and touch.x<x+20 and touch.y>y-20 and touch.y<y+20 then
scaler = 1
end
end
if touch.state==MOVING and scaler==1 then
x=x+touch.deltaX
y=y+touch.deltaY
end
if touch.state==ENDED then
scaler = .50
end
--Bottom Left
if touch.state==BEGAN then
if touch.x>x2-20 and touch.x<x2+20 and touch.y>y2-20 and touch.y<y2+20 then
scaler2 = 1
end
end
if touch.state==MOVING and scaler2==1 then
x2=x2+touch.deltaX
y2=y2+touch.deltaY
end
if touch.state==ENDED then
scaler2 = .50
end
--Top Right
if touch.state==BEGAN then
if touch.x>x4-20 and touch.x<x4+20 and touch.y>y4-20 and touch.y<y4+20 then
scaler4 = 1
end
end
if touch.state==MOVING and scaler4==1 then
x4=x4+touch.deltaX
y4=y4+touch.deltaY
end
if touch.state==ENDED then
scaler4 = .50
end
--Bottom Right
if touch.state==BEGAN then
if touch.x>x5-20 and touch.x<x5+20 and touch.y>y5-20 and touch.y<y5+20 then
scaler5 = 1
end
end
if touch.state==MOVING and scaler5==1 then
x5=x5+touch.deltaX
y5=y5+touch.deltaY
end
if touch.state==ENDED then
scaler5 = .50
end
end