Computer Science Canada loading bar....help plz |
Author: | lilsaku [ Thu Jun 14, 2007 2:35 am ] |
Post subject: | loading bar....help plz |
i cant seem to get this loading bar to wok. View.Set ("offscreenonly") % The background code. var pic : int := Pic.FileNew ("back.jpg") var width : int := Pic.Width (pic) var height : int := Pic.Height (pic) var x, y : int := 0 loop exit when y > maxy loop exit when x > maxx Pic.Draw (pic, x, y, picCopy) x := x + width end loop x := 0 y := y + height end loop %this is the code for the start screen var m, n, button : int var font1 := Font.New ("Arial:30") var font2 := Font.New ("Arial:14") var s : int := 0 var q : string Font.Draw (" welcome ", 1, 351, font1, white) Font.Draw (" welcome ", 0, 350, font1, black) %loading bar Font.Draw ("loading....", 300, 25, font2,red) colorback (black) var row, column : int loop randint (row, 23, 24) randint (column, 1, 80) locate (row, column) put " " .. View.Update exit end looploop Mouse.Where (m, n, button) Text.Locate (1, 1) drawfillbox (65, 245, 115, 295, white) drawfillbox (70, 250, 110, 290, black) Font.Draw (" start!", 65, 258, font2, white) View.Update if button = 1 and m >= 70 and m <= 110 and n >= 250 and n <= 290 then q := intstr (s) Font.Draw (" here we go!!!", 1, 201, font1, white) Font.Draw (" here we go!!!", 0, 200, font1, black) View.Update delay (1000) cls exit end if end loop |
Author: | Jerrik [ Sat Jun 16, 2007 9:55 pm ] | ||
Post subject: | Re: loading bar....help plz | ||
I'm unsure of what you actually wanted it to do, but I rewrote the loading bar to look like one..
Also, please use code tags when submitting code, it makes it much easier to read, as you can probably tell. EDIT - These are the kind of problems you might want to solve on your own in the future. They aren't particularly difficult, and it forces you to think about your code and what its actually doing, and why its doing that. Whenever something doesn't work the way its intended, it simply means we have a misunderstanding and can learn from it, or we made a typo and get to go on a bug catching safari. |