Help with Movie

Hi,
Can anyone help me get this working?
It runs, I see that images/frames on screen, but Igor tells me that the image is not available to add the frame.
I'm not using any switches, as the default settings should be fine.
Cheers,
Jason.

Function MovieFromImages()
String TempString
String BaseName
String WaveBaseName
Wave Frame
Variable NOI,i
multiopenfiles
string text_string = S_filename
Make/O/T/N=(ItemsInList(text_string, ";")) text_wave
text_wave = StringFromList(p, text_string, ";")

NOI=numpnts(text_wave)
Make/O/N=(NOI) Results
SetDataFolder root:
        BaseName = "Image"
       
        NewMovie
    For (i=1;i<NOI;i+=1)
        sprintf TempString "%*.*d" 3,3,i
        ImageLoad/O/N=Image text_wave[i]
        Wave Image
            If (i==1)
                NewImage Image
            Else
                RemoveImage Image
                AppendImage Image; DoUpdate
                AddMovieFrame
            EndIf
    Endfor
CloseMovie
End Function
You are using i to index into text_wave. Your for loop starts i from 1 but indices in Igor start from 0.
Thanks for the input.
I don't understand why that would make any difference?
Surely I can display a frame starting at any point along the wave.
Besides, I have tried regardless, and it still gives out the same errors.
Jason.
pczjrh wrote:
Hi,
Can anyone help me get this working?
It runs, I see that images/frames on screen, but Igor tells me that the image is not available to add the frame.
I'm not using any switches, as the default settings should be fine.


Have you tried using Igor's debugger to determine at what point in the For loop AddMovieFrame fails? Perhaps one or more points in your text wave do not contain valid values for ImageLoad, so it doesn't load anything. That would make Image a null wave and the rest of the loop would fail. I'd enable the debugger, turn on debug on error, and Null NVAR/SVAR/WAVE checking. Then set a breakpoint before entering the loop and step through to figure out why it's failing.
Okay, solved it. This might sound obvious after the matter, but here it is:

Before calling the NewMovie command I should have plotted the first frame.
Thanks to AC for suggesting the Debugger - I noticed it was complaining about not having a frame prior to the first loop.
Hope this helps others,
Jason.