The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How do you stop AnythingSlider via code? Re: How do you stop AnythingSlider via code?


Hi, Darfuria. It depends on which SWF player you’re using. There is documentation on how to use JavaScript to manipulate the Flash player. For YouTube embedded videos, you’re using their player and so check out their JavaScript API here:; from their documentation:

This event is fired whenever the player’s state changes. Possible values are unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5). When the SWF is first loaded it will broadcast an unstarted (-1) event. When the video is cued and ready to play it will broadcast a video cued event (5).

Inside the onStateChange listener, you’d check to see if it’s playing (1); if so, you’d call the stopSlider() function.