Hi,
This is a bit longer but does what you want (I think

)
Place all of your normal main loop inside the sub "MainLoop" and it should be fine
sync rate 0
sync on
make object cube 1,10
GLOBAL ang as INTEGER
do
goSub MainLoop
center text 320,240,"Press enter to display popup box"
if returnkey() = 1 then Popup("This is a popup! Press space to close!",99)
sync
loop
rem What happens in the main loop, so program doesn't pause when we show box
MainLoop:
inc ang
rotate object 1,wrapvalue(ang),wrapvalue(ang),wrapvalue(ang)
return
Function Popup(text$,_image)
rem Have to put "_" before image otherwise DBP thinks
rem I'm typing 'sprite image' instead of 'sprite image,0,0,image'
cls
rem Box
ink rgb(255,0,0),0
box 0,0,340,30
rem Text
ink 0,0
center text 16,10,text$
ink rgb(255,255,255),0
get image _image,0,0,320,30
sprite _image,0,0,_image
rem While we are not pressing space
while spacekey()=0
rem If mouse is over box
if mouseoverarea(sprite x(_image),sprite y(_image),sprite x(_image)+sprite width(_image),sprite y(_image)+sprite height(_image))=1
rem Allow us to move
while mouseclick()=1
sprite _image,mousex(),mousey(),_image
goSub MainLoop
sync
endwhile
endif
goSub MainLoop
sync
endwhile
delete sprite _image
EndFunction
Function MouseOverArea(x,y,x2,y2)
if mousex() > x and mousey() > y and mousex() < x2 and mousey() < y2 then over = 1
EndFunction over
Visit [url]www.lightning-systems.co.uk[/url]
You are the

th person to view this signature.