ArcBasicDocs

tutorials/beginner

05_stars.abs

33 lines of ArcBasic. Words in colour that are commands link to their help page. To run it, download ArcBasic, open the file and press F5.

Download 05_stars.absAll files in this folder

05_stars.abs
; A starry night: loops and random numbers draw it for usGraphics 640, 480SeedRnd MilliSecs()ClsColor 10, 10, 40Cls; 300 stars, each somewhere random, in a random shade of whiteFor star = 1 To 300	bright = Rand(100, 255)	Color bright, bright, bright	Plot Rand(0, 639), Rand(0, 479)Next; a few bigger, brighter starsColor 255, 255, 200For star = 1 To 12	Oval Rand(0, 630), Rand(0, 470), 3, 3Next; the moon: a pale circle with a dark circle over it makes a crescentColor 240, 240, 220Oval 480, 60, 80, 80Color 10, 10, 40Oval 500, 50, 80, 80Color 255, 255, 255Text 10, 450, "Run it again for a different sky. Press any key."WaitKeyEnd