Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quicktime-java digest, Vol 3 #283 - 5 msgs



I'm sure the best way to stop a movie at a certain time, is to use the "DrawingListener" interface. I tried to use it a lot of time, but it freeze my applet every time. Maybe you will have more chance than me... There is an exemple of code...

myQTPlayer.addDrawingListener(new DrawingListener() {
public void drawingComplete(QTDrawable qtdrawable) {
try{
if (myQTPlayer.getTime() >= playerStopTime)
myQTPlayer.setRate(0);
} catch(Exception ex){ System.out.println(ex); }
}
});

That code build a Anonymous class using the DrawingListener interface. For that class can access your QTPlayer, you must declare it global. It must be a public variable...

Anyway, if it doesn't working, use a Timer (java.util.Timer). It's not very precise, but it can stop the movie....

I hope that can help you...

BigBlackPapa

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus
_______________________________________________
quicktime-java mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-java
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.