
-----------------------------------
McDermaid16
Fri Apr 17, 2009 1:19 pm

Back Button Help
-----------------------------------
HI i was wondering if there is any possible way to create a back button which would bring you back to the beginning of the program so kind of like a restart button i have searched already and have yet to find anything that has worked. My code is below the button would be put after you have selected which shape to draw. 




/*   Author:Ryan McDermaid
 Version: 1
 Date: April 6th 09
 Description:Puts a different shape on screen dependent upon choice*/

%Shows The Mouse On Screen 
mouseshow

%Declares Font Variable To Make Arial Font
var font := Font.New ("arial:18")

%Draws A Fillbox
drawfillbox (20, 140, 200, 240, black)

%Puts Word In Arial Font In Specific Spot On Screen
Font.Draw ("Maple Leaf", 45, 188, font, white)

%Draws A Fillbox
drawfillbox (210, 200, 390, 300, magenta)

%Puts Word In Arial Font In Specific Spot On Screen
Font.Draw ("Box", 275, 245, font, black)

%Draws A Fillbox
drawfillbox (400, 145, 580, 245, red)

%Puts Word In Arial Font In Specific Spot On Screen
Font.Draw ("Oval", 459, 188, font, black)

%Draws A Fillbox
drawfillbox (210, 90, 390, 190, green)

%Puts Word In Arial Font In Specific Spot On Screen
Font.Draw ("Arc", 275, 140, font, black)

%Declares Varaibles
var x, y, btn : int

%Starts Loop
loop
    
    %Finds Mouse On Screen
    mousewhere (x, y, btn)

    %Starts Conditional Statement to on what to do dependent upon the mouses location
    if x >= 100 and x = 100 and y = 210 and x = 200 and y = 400 and x = 145 and y = 210 and x = 90 and y 