Movie problems: File extension .#0 instead of .mov and how to adjust image resolution

I have two issues I have when trying to make a movie from a graph. The graph is an image plot made by showing a layer from a 3D wave. The movie makes and runs ok, but the file extension is .#0 instead of .mov and I can't figure out how to adjust the resolution of the images in the movie.

Any ideas?

If I play the file in Igor instead (using the playmovie command) the resolution is fine - like the original graph.

The file extension problem happens using OSX 10.7 - I don't have quicktime on my windows virtual machine so it creates .avi files with the correct extension. These play with reasonable resolution, but it would be nice to be able to make the movie bigger without pixelation.

This is the function I'm using to make the movie:
Function ProdDistMovie(MovieTitle,GraphName,time_wave)
// makes a movie file showing distribution of products in O/C space.
    string MovieTitle // file name to be created
    string GraphName    // name of graph window
    wave time_wave // time wave
   
    variable N_tpnts=numpnts(time_wave)
    NewMovie /F=6 /L/I/O as MovieTitle
    variable t_ind
    DoWindow /F $GraphName // bring graph to front
    string ImageList=imagenamelist("",";")
    string ProdDistImg=stringfromlist(0,ImageList) // there should only be one image
   
    for (t_ind=0;t_ind<N_tpnts;t_ind+=1)
        TextBox/W=$GraphName/C/N=text1/F=0/E=2/A=RT/X=0.00/Y=0.00  Secs2Time(time_wave[t_ind],1)  
        modifyimage $ProdDistImg plane=t_ind // update layer of image to show for current time
        DoUpdate // update graph before adding movie frame
        AddMovieFrame
    endfor
    CloseMovie
End
I am not sure what is going on with your file name since I don't know what the
string MovieTitle // file name to be created

contains.

As for the movie size, I see you are doing DoWindow /F AFTER you are calling NewMovie. You should reread the details section of NewMovie especially the paragraph starting "The target window at the time you invoke NewMovie must be a graph"

Basically, the size is determined by the top graph at the time NewMovie is called.
Thanks Larry - you got them all in one I think. The file name string I was feeding the function was "ProdDistMovie_init3600_sd600". I think this is just too long as shorter names result in a correct ".mov" extension.

I was changing the window size using expansion from the right click menu, so that it looked the same without having to adjust axis labels etc. Resizing the window by dragging does the job! I also moved DoWindow before NewMovie. All sorted, thanks.

edit: I see that "On Macintosh, the name of the movie file is limited to 31 characters because Igor calls Apple routines that have this limit." This must be the full file name including the extension, as my string was 28 characters long.