sakuno08
|
Posted: Thu Jan 19, 2012 5:04 am Post subject: What am I doing wrong? |
|
|
K so I'm doing my final assignment thats due VERY SOON
and for some damn reason, my starts won't flicker, and my music won't play, can someone PLEASE tell me what I'm doing wrong. and how to fix it~!!!!
PLEASE AND THANK U~!
View.Set ("graphics:800;600")
View.Set ("offscreenonly")
%set up the snow
const NoOfFlakes := 400
var flakeX : array 1 .. NoOfFlakes of int
var flakeY : array 1 .. NoOfFlakes of int
var conx : array 1 .. 3 of int := init (400, 400, 470)
var cony : array 1 .. 3 of int := init (295, 275, 285)
for flake : 1 .. NoOfFlakes
flakeX (flake) := Rand.Int (0, maxx)
flakeY (flake) := Rand.Int (0, maxy)
end for
Music.PlayFileLoop (C:\Users\Karen\Documents\ICS)
loop
%Make the background
Draw.FillBox (0, 0, 800, 300, 29)
Draw.FillBox (0, 300, 800, 600, blue)
%sky
%Moon
Draw.FillOval (65, 550, 40, 40, white)
Draw.Oval(65,555,45,50,white)
%stars
for i : 20 .. 95 %(range of yellows)
Draw.FillStar (300, 500, 310, 510, i)
Draw.FillStar (265, 465, 255, 455, i)
Draw.FillStar (400, 550, 410, 540, i)
Draw.FillStar (200, 510, 210, 520, i)
Draw.FillStar (115, 550, 125, 560, i)
Draw.FillStar (375, 485, 365, 475, i)
Draw.FillStar (65, 480, 75, 490, i)
Draw.FillStar (130, 420, 140, 410, i)
Draw.FillStar (750, 550, 760, 560, i)
Draw.FillStar (510, 530, 500, 520, i)
Draw.FillStar (495, 500, 485, 490, i)
Draw.FillStar (490, 470, 480, 460, i)
Draw.FillStar (490, 430, 480, 420, i)
Draw.FillStar (460, 475, 450, 465, i)
Draw.FillStar (460, 430, 450, 420, i)
Draw.FillStar (690, 455, 700, 465, i)
Draw.FillStar (720, 430, 730, 440, i)
Draw.FillStar (700, 400, 710, 410, i)
Draw.FillStar (670, 405, 680, 415, i)
Draw.FillStar (630, 380, 640, 390, i)
Draw.FillStar (605, 350, 615, 360, i)
Draw.FillStar (600, 320, 610, 330, i)
end for
%Trunk
Draw.FillBox (380, 100, 420, 170, 113)
%Leaves
Draw.Line (300, 170, 500, 170, green)
Draw.Line (300, 170, 380, 250, green)
Draw.Line (500, 170, 420, 250, green)
Draw.Line (320, 250, 380, 250, green)
Draw.Line (420, 250, 480, 250, green)
Draw.Line (320, 250, 380, 310, green)
Draw.Line (480, 250, 420, 310, green)
Draw.Line (380, 310, 340, 310, green)
Draw.Line (420, 310, 460, 310, green)
Draw.Line (340, 310, 380, 350, green)
Draw.Line (460, 310, 420, 350, green)
Draw.Line (420, 350, 440, 350, green)
Draw.Line (380, 350, 360, 350, green)
Draw.Line (400, 390, 360, 350, green)
Draw.Line (400, 390, 440, 350, green)
Draw.Fill (400, 200, brightgreen, green)
%presents
%#1
Draw.FillBox (340, 100, 370, 130, brightred)
Draw.Line (340, 105, 365, 130, green)
Draw.Line (345, 100, 370, 125, green)
Draw.Line (340, 100, 340, 105, green)
Draw.Line (340, 100, 345, 100, green)
Draw.Line (370, 130, 365, 130, green)
Draw.Line (370, 130, 370, 125, green)
Draw.Fill (360, 120, green, green)
%#2
Draw.FillBox (330, 100, 290, 130, brightgreen)
Draw.Line (290, 105, 325, 130, brightpurple)
Draw.Line (295, 100, 330, 125, brightpurple)
Draw.Line (290, 100, 290, 105, brightpurple)
Draw.Line (290, 100, 295, 100, brightpurple)
Draw.Line (325, 130, 330, 130, brightpurple)
Draw.Line (330, 130, 330, 125, brightpurple)
Draw.Fill (310, 115, brightpurple, brightpurple)
%House
Draw.FillBox (50, 50, 300, 350, purple)
Draw.FillBox (10,350,340,430,black)
%door
Draw.FillBox (50, 50, 100, 130, brightred)
%Windows
Draw.FillBox (130,100,170,130,white)
Draw.FillBox (200,100,240,130,white)
Draw.FillBox (70,150,170,220,white)
Draw.FillBox (200,150,280,220,white)
Draw.FillBox (70,250,280,330,white)
drawfilloval (400, 150, 110, 110, white) %body of the snowman
drawfilloval (400, 290, 80, 80, white) %head of the snowman
drawfilloval (380, 310, 5, 5, black) %left eye of the snowman
drawfilloval (420, 310, 5, 5, black) %right eye of the snowman
Draw.FillPolygon (conx, cony, 3, 42) %nose of the snowman
drawfilloval (405, 260, 40, 10, black) %mouth of the snowman
drawfilloval (405, 265, 40, 10, white) %mouth of the snowman
drawfilloval (400, 237, 66, 10, brightred) %scarf on the snowman
drawfilloval (400, 243, 65, 5, white) %scarf on the snowman
drawfilloval (400, 200, 10, 10, black) %top button on snowman's body
drawfilloval (400, 150, 10, 10, black) %bottom button on snowmans's body
locate (maxrow, 2)
for flake : 1 .. NoOfFlakes
%Drop The Flake
flakeY (flake) -= Rand.Int (1, 5)
%flakeX (flake) += Rand.Int (-1, 1)
if flakeY (flake) < 0 then
flakeY (flake) := maxy
flakeX (flake) := Rand.Int (0, maxx)
end if
Draw.FillOval (flakeX (flake), flakeY (flake), 1, 1, white)
end for
%Update the screen (because of offscreen only)
View.Update
delay (25)
end loop
Music.PlayFileStop
~Sakuno |
|
|