Greetings,
I have two nested if loops that generate desktopOval objects. No problem. However, when I put in an if/then conditional to jump out of the inner loop, nothing is displayed; not even earlier objects. I tried oval.refresh. laserDot() is in a set. Here is a bit of the code:
For i, For x
for x=laser(i).left to laser(i).left + 200 paint out 200 ovals (later this will be undefined) therefore why the color.blue conditional
Var d As DesktopOval=New laserDot
laserDot(n).fillcolor=Laser(i).colour
laserDot(n).Width=1
laserDot(n).Height=1
laserDot(n).Visible=true
‘oval is placed on the screen
laserDot(n).left=x+laser(i).Width/2 '~301
laserDot(n).top=laser(i).top+ slope*(x-laser(i).left)+laser(i).Height/2
‘check for a color.blue pixel at the location of the most currently generated oval
‘this does work! However, the if conditional prevents any oval from being painted
pixelColor=rgbs.Pixel(laserDot(n).left, laserDot(n).top)
blue=pixelColor.Blue.ToString.ToInteger
‘the process is to stop if the line of ovals encounter a blue border
if blue>253 then continue For i
Do loops don’t work, same issue.
next x
next i
Thanks
5 posts - 5 participants