Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialtrina joy
6,525 PointsMedia Player Challenge - code to play/stop..
I've tried setOnAction, setOnFinished.. but that doesn't work..
2 Answers
Seth Kroger
56,413 PointsRight at the start of the quiz Craig gives you a link to the MediaPlayer docs: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/media/MediaPlayer.html You should should have that open on a 2nd tab so you can refer to it on all the quiz questions. If you look through the various setOn... methods it has you should be able to find ones that should fit.
Andrei Andras
13,239 PointsTry: onPlaying onStopped