Results 1 to 5 of 5

Thread: Invert function in Ultimate Fade-in slideshow (v1.51)

  1. #1
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Invert function in Ultimate Fade-in slideshow (v1.51)

    hi to all,

    i have installed this script http://www.dynamicdrive.com/dynamici...nslideshow.htm ...

    it's very nice ! But i need to invert the mouseover function:

    I want to start the slideshow on mouse over, and stop it on mouse out ...how can u do ?

    Thanks !

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    In the script, on one of the last lines(in the javascript), you'll see this:
    Code:
    crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
    crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
    Change that to this:
    Code:
    crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=1}
    crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=0}
    And that should work.
    Hope this Helps,
    Nile
    Jeremy | jfein.net

  3. #3
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    nice !

    Thanks

    Another tips ...if i want to start the slideshow, out of script ...for example, from an external href ?
    How can i call the start function ?

    PS: excuse me for my english !

  4. #4
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    nile, excuse me, ...but your suggest not works

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Nile's idea worked for me, but to prevent the slide show from running at the beginning, I found I needed to also add (red):

    Code:
    function fadepic(obj){
    if (obj.degree<100){
    obj.degree+=10
    if (obj.tempobj.filters&&obj.tempobj.filters[0]){
    if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
    obj.tempobj.filters[0].opacity=obj.degree
    else //else if IE5.5-
    obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
    }
    else if (obj.tempobj.style.MozOpacity)
    obj.tempobj.style.MozOpacity=obj.degree/101
    else if (obj.tempobj.style.KhtmlOpacity)
    obj.tempobj.style.KhtmlOpacity=obj.degree/100
    else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
    obj.tempobj.style.opacity=obj.degree/101
    }
    else{
    if(!obj.mouseinit)
    obj.mouseinit=obj.mouseovercheck=1;
    clearInterval(fadeclear[obj.slideshowid])
    obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
    obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
    obj.populateslide(obj.tempobj, obj.nextimageindex)
    obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
    setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
    }
    }
    And remember, pause must be enabled here:

    Code:
    new fadeshow(fadeimages, 140, 225, 0, 3000, 1)
    To unpause the show from a link or button, you can use the fadearray[] instance invoked by its number. The first show on a page is 0, the second one (if used) is 1, and so on (ex for the first slide show on a page):

    Code:
    fadearray[0].mouseovercheck=0;
    to start the show and:

    Code:
    fadearray[0].mouseovercheck=1;
    to stop it. Example using HTML a tag:

    HTML Code:
    <a href="#" onclick="fadearray[0].mouseovercheck=0;return false;">Go</a>
    Or even a toggle:

    HTML Code:
    <a href="#" onclick="fadearray[0].mouseovercheck=!fadearray[0].mouseovercheck;return false;">Pause/Resume</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •