Computer Science Canada

Need Help on Program

Author:  Killa Hilla [ Sun Mar 02, 2003 1:02 am ]
Post subject:  Need Help on Program

Ok i have made a name program that has my name and it blinks different colors. My problem is that when after a minute of looping the text goes small again and starts blinkin. How do I make it so that it keeps blinking in large font all the time? Here is the Code, try it out.

var w : int
w :=Window.Open ("fullscreen")
loop
colorback (45)
cls
var intfont : int
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,blue)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,yellow)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,black)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,42)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,35)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,grey)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,red)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,green)
delay(100)
intfont :=Font.New("Allegro BT:250")
Font.Draw("Josh",250, 350,intfont,Brown)
end loop

Please Respond with how to make it so the large text stay on.

Thank You

Author:  Dan [ Sun Mar 02, 2003 2:23 am ]
Post subject:  compsci.ca

i looked at your code and i am not shure why it was doing that but i was able to fixe it by moving the stuff in your loop that did not need to be in it out of it.

the flowing did not need to be in the loop and shode only have been decaled once:

var intfont : int
intfont := Font.New ("Allegro BT:250")
colorback (45)
cls

so the new cold whode look like this:

code:

var w : int
w := Window.Open ("fullscreen")
var intfont : int
intfont := Font.New ("Allegro BT:250")
colorback (45)
cls

loop
    Font.Draw ("Josh", 250, 350, intfont, blue)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, yellow)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, black)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, 42)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, 35)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, grey)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, red)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, green)
    delay (100)
    Font.Draw ("Josh", 250, 350, intfont, brown)
end loop


i test that and it wroked for me.


: