Thank you guys, I assumed that the section in the graphics commands called "print #handle, "when leftButtonDown"" was all there was about the command and didn't realize/remember the section above it stating this. Sorry about that
I think exiting a loop without using an exit for will eventually cause stack problems. If there is a possibility that based on some condition I need to exit a loop prematurely I set a flag then then exit the loop. Based on the flag condition when I exit the loop, I go to somewhere else.
for x=1 to 100
if x= 76 then
if flag=1 then goto [print]
[print] print x
Can GOTO cause huge problems if used to make a constant loop before a wait? I have noticed that my programs work like event driven programs until it encounters trapclose [quit] end . But if I use GOTO to make a loop to the beginning of the program and continue to use it to force line executes like the old basic language, trapclose [quit] wont work and when I want to close the window I need to use Kill basic program. It depending on how long I run it will say that there are multiple instances of the same program running. I started fresh and it usually says there are 2 instances. Then I get an error that says that I have exceeded certain limits. This happened when I tried to make a loop in draws with GOTO and used FOR?NEXT loops to pause the animation. It keeps running but closing such a program structure is a problem. I fixed the problem later by just removing GOTO and treating the program like its event driven. WAIT seems to know what it should return to or it knows what is the main control group in the program is.