I need some help with slide show script

Discussion in 'HTML & Website Design' started by nescafe, Nov 12, 2010.

  1. #1
    How to add Stop, Previos, Play, Pause, buttons on this script.

    <html>
    <head>
    <script type="text/javascript">
    <!--
    var image1=new Image()
    image1.src="firstcar.gif"
    var image2=new Image()
    image2.src="secondcar"
    var image3=new Image()
    image3.src="thirdcar.gif"
    //-->
    </script>
    </head>
    <body>
    <img src="firstcar.gif" name="slide" width="100" height="56" />
    <script>
    <!--
    //variable that will increment through the images
    var step=1
    function slideit(){
    //if browser does not support the image object, exit.
    if (!document.images)
    return
    document.images.slide.src=eval("image"+step+".src")
    if (step<3)
    step++
    else
    step=1
    //call function "slideit()" every 2.5 seconds
    setTimeout("slideit()",2500)
    }
    slideit()
    //-->
    </script>
    </body>
    </html>  
    PHP:

     
    nescafe, Nov 12, 2010 IP
  2. fancymouj

    fancymouj Peon

    Messages:
    5,019
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hi mate,,

    The actual pause function was obsoleted some versions ago, these days
    one pauses the timeline by looping on the current frame.

    There's really little difference between stop and pause.

    here are some scripts that would control the main timeline, the global
    could be checked by a external linked movie member the closest thing to
    the more functional film clips in flash.

    --You pause button script could be:

    on mouseUp
    global myPauseState
    myPauseState = true

    -- to toggle the pause state:
    -- myPauseState = not myPauseState
    end




    --The score script spread over all frames of thge controled segment
    would be:

    on exitFrame
    global myPauseState
    if myPauseState then go to the frame
    -- else play to next frame a movie frame rate
    end


    -- a rewind could just go to the first marker to the left.

    on mouseUp
    go to loop
    end
     
    fancymouj, Nov 12, 2010 IP
  3. nescafe

    nescafe Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks buddy but how to apply that in the script, how should look like, i tried but unsuccesful.
     
    nescafe, Nov 12, 2010 IP
  4. GWiz

    GWiz Peon

    Messages:
    359
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #4
    My suggestion is to go to a website like www.dynamicdrive.com and find a script with similar functionality and see how the code works.
     
    GWiz, Nov 16, 2010 IP
  5. nescafe

    nescafe Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Buddy thanks a lot for this site.
     
    nescafe, Nov 16, 2010 IP
  6. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #6
    workingsmart, Nov 16, 2010 IP
  7. nescafe

    nescafe Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks a lot, beautyfol site have many useful thinks.
     
    nescafe, Nov 16, 2010 IP