subr imagelist_sendmovie, i, type, nim
 ;regenerate the list and send to the movie widget
 ;if we have the times and positions for type 2 and 3, flag it. This will
 ;allow manipulations to pass through if/when we do that
 xtpopup, mvget_widget()	;define/popup movie creator
 $mv_label = $image_list_tags(i)
 ty,'$mv_label from imagelist_sendmovie =', $mv_label
 xmsetoptionselection, $mvget_sop(0), $mvget_sop($option_value+1)
 mvget_source_cb
 ;always set the deltas to 1
 xmtextfieldsetstring, $mvcubetext(3), '1'
 xmtextfieldsetstring, $mvcubetext(4), '1'
 xmtextfieldsetstring, $mvcubetext(5), '1'
 xmtextfieldsetstring, $mvgettext3, '0'
 xmtextfieldsetstring, $mvgettext4, string(nim-1)
 mv_setsizes, 0, 0, nim, 1, 1, 1
 if type eq 1 then {
   ;TRACE case
   xmtextfieldsetstring, $mvgettext6, $image_list_entry_text
   $mvget_trace_list_id = i
   $mv_have_time = 0
   $mv_have_xy = 0
   return
 }
 $mv_have_time = 1
 $mv_have_xy = 1
 $mvget_times = eval(sprintf('$image_list_times%d',i))
 $mvget_xc = eval(sprintf('$image_list_xc%d',i))
 $mvget_yc = eval(sprintf('$image_list_yc%d',i))
 $mvget_pixsc = eval(sprintf('$image_list_pixsc%d',i))
 if type eq 2 or type eq 4 or type eq 5  or type eq 6   or type eq 7 then {
   xmtextfieldsetstring, $mvgettext7, $image_list_tags(i)
   $mvget_files = eval(sprintf('$image_list_files%d',i))
   return
  }
 ;note that type 3 are La Palma thumbnails, these have a specific file name pattern
 if type eq 3 then {
   xmtextfieldsetstring, $mvgettext7, $image_list_tags(i)
   $mvget_files = strarr(nim)
   items = eval(sprintf('$image_list_tops%d',i))
   paths = eval(sprintf('$image_list_files%d',i))
   for k=0,nim-1 do {
    j = items(0,k)
    $mvget_files(k) = paths(j) + fns('im######.jpg', items(1,k))
    }
  }
 endsubr
 ;=======================================================================
