Diablo 98188,
TDK's method for the detection between the mouse and multiple buttons is a "hard-code" method. Which, is useful if you are not using sprites as the button images, or do not have your buttons "patterned out" around the screen, as to be enabled to use some pattern formula to detect the collisions in a single for next loop.
However, if your buttons are sprites, you could set up a for next loop, where its starting value is the sprite number of the first button, and then ending value is the sprite number of the last button. Note, that to use this method, your button sprites must be a group of numbers in series. To clarify, for example: 1,2,3,4,5 or 20,21,22,23,24. This way, the for next loop just counts up through the sprite numbers.
Within the for next loop, you check the mouse against the dimensions of each sprite image, by using their x and y coordinates along with their heights and widths. So to say, if the mouse is to the right of its x coordinate, and below its y coordinate, and to the left of its right side(x coordinate + sprite width), and above its bottom side(y coordinate + sprite height), then the mouse is within the sprite.
Example:
mx = mousex()
my = mousey()
REM << for next loop checks if the mouse is within either sprite(there are 5 sprites)
for t = 8 to 12
sx = sprite x(t)
sy = sprite y(t)
REM << if mouse is within current sprite then make its image the "on" image
if mx => sx and mx =< mx + sprite width(t) and my => sy and my =< sy + sprite height(t)
REM << in this example each sprite's "on" image is the sprite # + 5(sprite 8's is image # 13)
sprite t,mx,my,t + 5
else
REM << in this example each sprite's "off" image # is the same as the sprite #
sprite t,mx,my,t
endif
next t
Also, if you are not using sprites, but some other form of displaying the buttons onto the screen, then you can use this same method by checking the values in an array.
Example:
mx = mousex()
my = mousey()
for t = 8 to 12
if mx => button(t,1) and mx =< button(t,2) and my => button(t,3) and my =< button(t,4)
paste image t + 5,button(t,1),button(t,2)
else
paste image t,button(t,1),button(t,2)
endif
next t
If your not using sprites, the last method I prefer to you.

+NanoBrain+