Hi,
I had a similar problem doing a while(...) {... wait(1) ...} within an entity event. It seemed that it ran just for one frame. The manual says that you should not use wait(1) in entity events - maybe thats also true for panel events.
So maybe it could help to do the panel movement in a seperate function and just set a trigger in the panel event. Something like ...
var popupboxDrag = 0;
function popupbox_click_event();
PANEL* popupbox =
{
bmap = popupbox_map;
layer = 4;
event = popupbox_click_event;
}
function popupbox_click_event()
{
popupboxDrag = 1
}
function popupboxAction()
{
while(1)
{
if(popupboxDrag)
{
popupboxDrag = 0;
while(mouse_left)
{
popupbox.pos_x += mickey.x;
popupbox.pos_y += mickey.y;
wait(1);
}
}
wait(1);
}
}
main()
{
...
popupboxAction();
...
}