From what i’ve gathered i have to initialize my movieview with QTMovieOpenForPlaybackAttribute set to YES.
then I can set QTMovieLoopsBackAndForthAttribute to YES.
But, i’m not understanding how to use these commands. I tried to set them by:
tell current application’s QTMovie…
&
Tell movie view…
&
I tried setting them as a runtime attribute applied to QTMovie View.
Looking at the documentation, I’m guessing it’s something like:
set theURL to current application's NSURL's fileURLWithPath_("path/to/file")
set theMovie to current application's QTMovie()'s movieWithAttributes_error_({QTMovieOpenForPlaybackAttribute:true}, missing value)
tell theMoive to setMovieAttributes_({QTMovieURLAttribute:theURL, QTMovieLoopsBackAndForthAttribute:true})
Another method ( also not tested ) would be to change the rate “setRate_(-1)” when the movie has got to the end.
This method would allow you to change the functionality without locking you into a movie that will only loop back and forth. The movie rate can be set from negative values through to positive values i.e. -0.5 is playing at backwards at half normal rate, -2 being double normal speed in reverse