Maybe something like this:
cls
`Just making the buttons here, you'd obviously use
`your own images
for t=1 to 6
ink rgb(rnd(235)+20,rnd(235)+20,rnd(235)+20),1
box 0,t*20-20,70,t*20
next t
for t=1 to 6
get image t,0,t*20-20,70,t*20
next t
cls
`now making & positioning the sprites
sprite 1,10,10,1
sprite 2,10,30,2
sprite 3,85,10,3
sprite 4,85,30,4
sprite 5,85,10,5
sprite 6,85,30,6
`hiding the sprites you don't need
for t=3 to 6
hide sprite t
next t
`make an array to show which menu is visible
dim menuvisible(2)
do
`check for mousclick
if mouseclick()=1
`if the mouse is clicked while it is over sprite one, show sprite 3 and 4
if mousex()>sprite x(1) and mousey()>sprite y(1) and mousex()<(sprite x(1)+sprite width(1)) and mousey()<(sprite y(1)+sprite height(1))
show sprite 3
show sprite 4
`this menuvisible means that the computer knows whether the menu is open
`and therefore whether to do whatever you want it to
menuvisible(1)=1
else
hide sprite 3
hide sprite 4
menuvisible(1)=0
if mousex()>sprite x(2) and mousey()>sprite y(2) and mousex()<(sprite x(2)+sprite width(2)) and mousey()<(sprite y(2)+sprite height(2)) and mouseclick()=1
show sprite 5
show sprite 6
menuvisible(2)=1
else
hide sprite 5
hide sprite 6
menuvisible(2)=0
endif
endif
endif
loop
http://jamesmason01.googlepages.com/index.htm