Results 1 to 4 of 4

Thread: Stop flash movies when slide changes

  1. #1
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post

    Question Stop flash movies when slide changes

    1) Script Title:
    onChange: function(previndex, curindex){
    }

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...tentslider.htm

    3) Describe problem:

    Hi, at first, thanks alot for the script.

    I have 9 slides on this Featured Content Slider and every slide have one flv movie loaded. When i start one movie, and i want to load another slide, and start that flv movie. But the movie from previous slide is not stoping, and plays in same time with the movie from other slide. I hope that you understand me. Thanks a lot.

    p.s. i give you an example here:
    http://www.silveradv.com/www/bg/skills/tvklipove.html
    Last edited by shlajfka; 11-13-2008 at 11:45 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Is there a way to stop the playing of your Flash movie using JavaScript? Once you know what it is, you can then use the onChange event handler of the script to call that whenever the user changes slide:

    Code:
    onChange: function(previndex, curindex){
    if (previndex==curindex) //if two indices point to the same slide (page first loads)
     return //do nothing
    else if (previndex==1)
     videoplayer.stop("cats")
    else if (previndex==2)
     videoplayer.stop("dogs")
    else if (previndex==3)
     videoplayer.stop("myvacation")
    }
    DD Admin

  3. #3
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    Should i post else if as much as i have slides with videos? and videoplayer.stop("ID or NAME of video are here? ")

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    It really depends how your Flash player actually allows you to stop the player using JavaScript. videoplayer.stop("cats") is just an example, not how you'd actually do it. You need to find that out first, then post the line required before I can provide the rest of the code.
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •