[EDIT: Sorry to those who already answered - in my sleep deprived state, I forgot that this particular situation is a YouTube movie, not a JW FLV player. I see that there is more extensive documentation on interacting with movies on YouTube, so I will continue this, but any additional information is also welcome]
I use YouTube embedded videos in a collection of div elements that rotate using the jQuery plugin ( http://malsup.com/jquery/cycle/ ).
I would like the loop to stop when I click on one of the movies to start playing it, but I cannot figure out how to attach the jQuery event handler to the player object.
This is what my current code looks like (you cannot directly select the object tag using jQuery, so I select the parent div and then get the object element as the first child):
$("div.feature-player").children(":first").click(function(event) {
$('#features').cycle('stop');
});
But that does not do the trick. I am not the author of Flash, so I am not very familiar with ActionScript and have never before set up the interaction between JavaScript and a Flash movie.
source
share