
-----------------------------------
nin
Fri Dec 29, 2006 5:31 pm

button problem
-----------------------------------
hey can you people help me please. The program that i did below is suppose to tell the user the color of the circle that they click, but when i clicked it, it didnt work at all.. 0.o? so can anyone help me please and thank you soo much =) 

------------------------------------------------------------------------------------- 

%Declaration section 
var finished : boolean := false 
var rangex, rangey, button : int 

%set screen mode and size 
setscreen ("graphics:300;300") 

%Program Title 
procedure title 
cls 
locate (1, 16) 
put "Colours" 
end title 

%Program introduction 
procedure introduction 
title 
locate (3, 1) 
put "Click a circle." 
locate (5, 1) 
put "If you want to exit, click exit." 
end introduction 

procedure display 
%circles 
drawfilloval (50, 150, 30, 30, 100) 
drawfilloval (150, 150, 30, 30, yellow) 
drawfilloval (250, 150, 30, 30, 29) 
mousewhere (rangex, rangey, button) 
if button = 1 then 
if rangex >= 50 and rangex = 50 and rangey 