
-----------------------------------
Deja_vu
Sun Jun 10, 2007 2:49 pm

New to Turing. Click  buttons wouldn't lead to the pages wanted
-----------------------------------
Hey guys! what's up???

We just started learning Turning program early this year and right now I am working on my last culminating activity in that class to finish off the year.

My project is to use Turning to control my zoo(model)'s temperature and heat according to the user's input info.
I started writting and this is what it looks like so far (don't laugh at me I know it looks really stupid to you guys)

*********************************************************************************************************************************

var x, y, button1, button2 : int
var intro1 : string := "Hi there, and welcome to the zoo. My name is Emily and I will be your host for the day."
var intro2 : string := "To start set up, simply click on the animal section you would like to change"
var intro3 : string := "For help&information, click help button"
var intro4 : string := "To quit, click quit button."

var font : int := Font.New ("Forte 0:12")


loop
    % Creating the map of the zoo (home page)
    drawfillbox (250, 250, 300, 155, red)
    drawfillbox (320, 110, 420, 150, blue)
    drawfillbox (500, 250, 440, 155, green)
    drawfillbox (320, 260, 420, 310, yellow)
    % labels and buttons (home page)
    Font.Draw (intro1, 0, 380, font, 120)
    Font.Draw (intro2, 0, 340, font, 120)
    Font.Draw (intro3, 0, 50, font, 120)
    Font.Draw (intro4, 0, 15, font, 120)
    % creating help and quit button
    drawfillbox (320, 69, 290, 45, 77)
    drawfillbox (320, 34, 290, 10, 61)
end loop

var welcome1 : string := "Welcome to the graffiel section of the zoo"
var welcome2 : string := "Welcome to the lion section of the zoo"
var welcome3 : string := "Welcome to the zebra section of the zoo"
var welcome4 : string := "Welcome to the tiger section of the zoo"
loop
    % selected animal section
    buttonwait ("down", x, y, button1, button2)
    locate (1, 1)
     % giraf
    if x >= 250 and x = 155 and y = 500 and x = 250 and y = 320 and x = 110 and y = 320 and x = 260 and y = 320 and x = 69 and y = 320 and x = 30 and y 