I am going in circles at the moment, trying to loop a QT movie. Opening and playing the movie is not an issue, just the loop. All my searches lead me to the same code ( cocoa ) and I have tried to translate to asobjc but have to throw the towel in on this one.
QTMovieLoopsAttribute needs to be set to YES and as per the QTMovie.h file,
Apple’s site also referred me to the following cocoa code that is similar to what i want to achieve
set pathToMovie to POSIX path of (choose file)
tell current application's NSDictionary to set theAtts to dictionaryWithObjects_forKeys_({pathToMovie, true, true}, {current application's QTMovieFileNameAttribute, current application's QTMovieOpenForPlaybackAttribute, current application's QTMovieLoopsAttribute})
set theMovie to current application's QTMovie's alloc()'s initWithAttributes_error_(theAtts, missing value)
movieView's setMovie_(theMovie)
tell movieView's movie() to play()
FYI - The movie would not play automatically. I reverted to my previous code ( play_(me)) to play and still did not play.I then added a delay command inbetween setMovie_(theMovie) and play and it played automatically.
Do you think it could be something to do with load state of the movie?
I am going to play around with QTMovieLoadStateComplete and see if that does the trick.
Once again, thanks! Now that I can compare how your code translates to the cocoa methods, I am hoping that all the other frameworks oddities will start to make a bit more sense !