AJAX Image Gallery powered by Slideflow (like Cover Flow)

MES veröffentlicht seine AJAX Slideflow Control, die im Rahmen unserer neuen Videokonsole entwickelt wurde, unter Creative Commons (CC-by 3.0). In unserer Demo kommt sie für eine Fotogalerie zum Einsatz.

Live-Demo:


Der Foliensatz kann mit der Maus gedraggt werden. Per Click kann an eine gewünschte Stelle gesprungen werden. Die Navigation per Mausrad und Pfeiltasten ist nach einem Click auf das Demofenster möglich – oder probieren Sie die Demo einfach im Vollbildmodus aus.

Technischer Hintergrund: Fotodaten werden aus einer XML-Datei ausgelesen; Thumbnails werden per Photoshop-Aktion vorgeneriert (im Download enthalten).
03/28/2008: Update auf Slideflow 1.1 – Der Bildzuschnitt und die Richtung des Farbverlaufs wurden korrigiert!

Slideflow 1.1 mit Gallerie-Demo herunterladen

Wir sind darauf gespannt, wo Slideflow zum Einsaz kommt – wenn Ihnen Slideflow gefallen hat, hinterlassen Sie uns einen Kommentar!

Credits:

Slideflow in ihren Skripts einsetzen

Die Gallerie-Demo ist ein guter Startpunkt. In slideflow.js haben wir alle wichtigen Aspekte des Codes dokumentiert. Die wichtigsten Parameter, wie z.B. die Pfade zu den Bilddaten und das DOM-Objekt, unter dem Slideflow erstellt werden soll, werden bei Initialisierung übergeben. Das Steuerelement bietet auch Methoden, um die Anzeige zur Laufzeit zu verändern, sowie Callbacks, die es der Anwendung ermöglichen, auf Slideflow-Bewegungen und Clicks auf die Mittelfolie zu reagieren. Bitte beachten Sie, dass das Steuerelement spezifisches CSS benötigt (slideflow.css).

Anwendung der Photoshop-Aktionen

Die Bilder müssen durch Photoshop-Aktionen aufbereitet werden (ursprünglich von Marcus Strehlow), um die Miniaturbilder mit linker, rechter und zentrierter Ausrichtung zu erstellen. Diese Bilder müssen jeweils in separate Verzeichnisse gespeichert werden, die dem Steuerelement dann als pathLeft, pathRight und pathCenter übergeben werden.
We opted for Photoshop’s Save for Web feature instead of the regular JPEG export because it delivers far superior quality. Unfortunately, Save for Web doesn’t work well with batches and requires one to manually update the export directories for each of the three Slideflow actions. This can be done by performing the following steps:

  1. Create a blank RGB document, or open any RGB image
  2. Navigate to the action’s Export command, which is second to last and double-click it
  3. The Save for Web dialog opens. Save the blank document in your target folder for the respective action (i.e. left for the left action etc.)
  4. If you’re like Tim and like a clean system, you may delete the JPEG you just created

All actions assume 4 : 3 ratio. If pictures have a different ratio, you need to adjust it first, or the thumbnail images will have white edges.

Schlagworte: , , , , ,

142 Kommentare zu „AJAX Image Gallery powered by Slideflow (like Cover Flow)“

  1. Rick sagt:

    When I run the photos through the Photoshop actions the picture develops a black shade across the bottom half of the photo. It does this left, center, or right actions. Anyone else seen this or have any remedies?

  2. ekid sagt:

    the photoshop action
    is possilbe to using gd or IM to make it?

  3. mitliza sagt:

    Is very good!!Thank you!

  4. Xtence sagt:

    Great post, like it very much, keep on the good work!

  5. Nantha sagt:

    hi your demo code is not working properly so please check the code and send it …

  6. kdorg sagt:

    Hi, thanks for this control… when i put the slideflow inside a here slideflow… the images thumbnails show wrong. Why? How can I fix that?… do you have a forum support or something? thank you.

  7. yemek sagt:

    fantastic ajax sample. very nice

  8. Stephen O'Sullivan sagt:

    Hi Guys,

    I have successfully written a php script that automatically makes the required images from a single image that is uploaded from a html form.

    However, there are some limitations:
    - The whitespace behind the skewed left and right images cannot be transparent, therefore the background of the gallery will need to be a single color
    - I could not replicate the mirror effect on the bottom of the images

    I haven’t put too much time into it, i’ve only spent a few hours today but it think the code you have posted is amazing and I’m more than willing to share mine.

    Let me know where to send the scripts to, i’ll tidy it up this evening and should be in a position to e-mail it by tomorrow.

    Kind Regards,
    Stephen

  9. rap dinle sagt:

    Any help would be great. Thx

  10. Phanleson sagt:

    Thank, this is good, but very slow
    any one can help me find a few similar demo same this
    Please pm to me, thanks
    phanleson[at]gmail[dot].com

  11. Don sagt:

    While I agree that the demo is slow. it is because there’s so many images included in the demo. If you look at one that has fewer images its good. Thanks guys for putting this together, i was looking for a good script to make a photo gallery for my site and this fits the bill. I found the scrolling function rather annoying though but was able to disable it by removing the scrolling.js from the code.

  12. Samuel sagt:

    hi I’m checking out this and like it a lot this far! My problem is that when I download it and run it locally in IE7 I get an error message saying that “photos.item is null or not an object”? Why? It’s no problem with Firefox? Could it be any problems with the xmlparser.js? I would be so happy if anyone at least could give me a hint!

    samuel02[at]gmail[dot]com

  13. Somnath sagt:

    Fantastic remarkable!!!

  14. qhnz sagt:

    This is GREAT script. But there are 2 problems I saw:

    1. It is VERY SLOW! Any one did improve it. Please let me know by sending me an email (below). Hope to get your wisdom.

    2. If I move the bottom scrollbar or click on the next thumb nail, the thumbnail will move and the new one will be centered. However, the center one does not show in large image box yet. I have to click the center thumbnail to see it in large size. Why? How to make the script to display large size WHEN the new thumbnail is centered?

    My email is quanghoc [at] yahoo dot com

    Thanks

  15. freeman sagt:

    THANKS!!! GREAT script for 3d gallery…

  16. hany sagt:

    why after i downloaded i’m try to open the gallery.html
    it open a blank page i need to see the sample which on the top

  17. Mark Joseph sagt:

    the best script so far in “cover flow in iphone” category. I searched over the internet with this kind of script but this work is the only one who supports scrolling by dragging the image on left or right. GREAT JOB!

  18. Daï sagt:

    How can I fix the error on line 66 on IE ?

    TIA

  19. amenity sagt:

    This is really beautiful, thanks for all your work. Unfortunately, I’m not very experienced with Photoshop actions, and I’m having trouble adjusting for my 3:4 image ratio. Any pointers?
    Also, do I need to change any of the javascript for the taller images? I’d be happy to make a step by step how-to (or send you my adjusted .atn file for others to download) if I can figure it out.

  20. Juan sagt:

    So, what if I want to use this for a “portfolio” style viewing.
    Here’s the Idea.

    I want to have 9 viewings. 4 Left, 1 center, 4 right.
    But I want this to scroll to the middle at launch.
    And being able to control it left or right. with mouse and possibly with a left/right button on each end.
    The middle of course will be launched and previewed.

    Any ideas on how I should go with this?

  21. OJ sagt:

    fantastic!!!

  22. spiddy sagt:

    thank you for slide show
    i use in http://www.ringtonezone.bloggoo.com

    i not good english 555 but very thank you

  23. Great gallery, some years ago the only option for an attractive gallery was Flash, but since AJAX become more popular I can made galleries very funtionals, attractives and ligth in weigth.

  24. Aqeel sagt:

    I want to convert it dynamically gallery.
    i mean i ll get the records from database and then display the whole images.
    anybody have idea about this???
    please tell me asp.
    thanx a lot

  25. Stu sagt:

    I have managed to disect the code to give me just the slide flow, no scroll bar, no big image. I added a in the xml and but just don’t know how (not being a scripter) to get the ‘handleSlideClick’ function to change from ’swapPhoto’ to open the url in the xml in the target I specify in the url.

    e.g. Front slide when clicked will go to /folder/page.asp?blablabla in the frame named ‘myframe’

    Any help would be much appreciated

  26. Peter Jan sagt:

    Jammer dat het erg traag is, maar een supergoed initiatief!

    It’s very slow, however, it’s a fantastic script!

  27. Max sagt:

    Nice effect !

  28. Hannah sagt:

    Hello,

    I have been given a project at work to display the screenshots on our website in a more visually appealing way :-)

    I came across your gallery and think this may be just what I am looking for but have a question before I put the time into setting this up.
    I am looking to link to specific images (centered) within the gallery from a thumbnail on a separate HTML page. Is this possible?

    Kind Regards
    Hannah

  29. Tom sagt:

    Hello,
    Thanks for this project it is so good and functional.

    I want it to know if I could change something of the code. I need that when they click on the center image goes to another webpage.

    See you later,
    Thz
    Tom

  30. cubrikaska sagt:

    No veo en esto el sentido.

  31. Domenico sagt:

    beautiful, but not work with MooTools

  32. Very good effects in the gallery but I agree with some spilled commentaries, everything has a price and here the price that is pleased is the time. Delay much in loading.

  33. Dave sagt:

    If you think the demo is too slow, just download
    Download Slideflow 1.1 including gallery demo, it is much faster
    and better quality

  34. Jey sagt:

    Hi,
    Very good thanks.
    However, for some reason, it does not work for me under IE? I only see the horizontal bars and the scrollbar, but no image, while it works perfectly with Firefox, Google chrome, etc… Any fix possible?
    thanks

  35. rakhi sagt:

    Very nice script but not working in IE. Plz suggest me how to solve this problem?

  36. Terry H sagt:

    I am trying to use this gallery in a site. I am wondering if you can z-index over the top of it. I have had no success. Do you have any ideas how I can overlay a frame (.png, with some shadow) over this?
    Thanks for any ideas.

  37. Terry H sagt:

    btw, mine works in IE ok. Right now to test it I put my page in the root of the file structure in what his zip file created. I made no deviations to anything. I put his header stuff in my head and the body like he has it in my body in a div to make it fit my purpose.

    Here is my code (unfinished page but working), see if it helps with your IE issues.

    <!–
    var numPhotos;
    var slideFlowSlider;
    var slideFlow;
    var currentImg;
    var preloader;
    var fadeInTimeout;
    var scrollHandler;
    var photos;
    var currentEffect;
    var slHover;

    var SLIDE_TPL = {
    'b_vertical' : false, 'b_watch': true /* update while dragging */, 'n_controlWidth': 300, 'n_controlHeight': 7,
    'n_sliderWidth': 14, 'n_sliderHeight': 7, 'n_pathLeft' : 0, 'n_pathTop' : 0, 'n_pathLength' : 300-14, 'n_zIndex': 1
    }

    var SLIDE_INIT = {
    'n_minValue' : 0, 'n_maxValue' : 100, 'n_value' : 0, 'n_step' : 1
    }

    var SLIDEFLOW_DATA = {
    'imgWidthNormal': 100, 'imgWidthTilted': 75, 'imgHeight': 90, 'slideDistance': 25,
    'onCenterClick': handleSlideClick, 'handleSlideMove': handleSlideMove, 'containerElement': null,
    'pathLeft': 'photos/left', 'pathCenter': 'photos/center', 'pathRight': 'photos/right',
    'transparentImg': 'images/transparent.gif', 'cursorOpenHand': 'images/openhand.cur', 'cursorClosedHand': 'images/closedhand.cur'
    }

    function handleSlideMove(pos) {
    if (slideFlowSlider)
    slideFlowSlider.f_setValue(pos, false, true /* kein update */);
    }

    function handleSlideClick(imgNumber) {
    swapPhoto(imgNumber);
    }

    function handleSlideSeek(pos) {
    slideFlow.disableMoveUpdate();
    slideFlow.glideToPerc(pos);
    }

    function swapPhoto(photoNumber) {
    /* Preload */
    var imgSrc = 'photos/large/'+ photos.item(photoNumber – 1).getElementsByTagName("src")[0].childNodes[0].nodeValue;
    var wasPreloading = (preloader != undefined);
    preloader = new Image;
    preloader.src = imgSrc;
    currentImg = photoNumber;

    /* Fade out and show new photo */
    if (!wasPreloading) {
    if (currentEffect && currentEffect.state != 'finished')
    currentEffect.cancel();

    currentEffect = new Effect.Fade($('fadeArea'), { duration:0.4, to: 0.001, afterFinish: fadeIn });
    }
    }

    function skipPhoto(offset) {
    photoNumber = currentImg + offset;
    if (photoNumber numPhotos)
    return;

    swapPhoto(photoNumber);
    slideFlow.glideToSlide(photoNumber);
    }

    function fadeIn() {
    fadeInTimeout = null;

    if (!preloader)
    return;
    else if (preloader.complete) {
    if (currentEffect && currentEffect.state != ‘finished’)
    currentEffect.cancel();
    currentEffect = new Effect.Appear($(’fadeArea’), {duration: 0.8, beforeSetup: function(effect) {
    $(’photo’).src = preloader.src;
    $(’title’).innerHTML = photos.item(currentImg – 1).getElementsByTagName(”title”)[0].childNodes[0].nodeValue;
    $(’subtitle’).innerHTML = photos.item(currentImg – 1).getElementsByTagName(”subtitle”)[0].childNodes[0].nodeValue;
    preloader = undefined;
    }});
    } else if (!fadeInTimeout) {
    fadeInTimeout = window.setTimeout(”fadeIn()”, 100);
    }
    }

    function handleWheel(delta) {
    if (slideFlow)
    slideFlow.scroll(delta);
    }

    function handleKeys(evt) {
    evt = (evt) ? evt : ((window.event) ? event : null);
    if (evt) {
    //debugLog(”key ” + evt.keyCode);
    switch (evt.keyCode) {
    case 40: /* down */
    case 39: /* right */
    skipPhoto(1);
    return false;
    break;
    case 38: /* up */
    case 37: /* left */
    skipPhoto(-1);
    return false;
    break;
    }
    }
    }

    function init() {
    swapPhoto(1);
    slideFlowSlider.f_show();
    document.onkeydown = handleKeys;
    scrollHandler = new ScrollHandler(handleWheel);

    /* Preload slider hover */
    slHover = new Image;
    slHover.src = “images/seekslider-hover.gif”;

    /* IE6 hover fix */
    if (window.ieFixHover) {
    $$(’.sliderbutton’).each(ieFixHover);
    }
    }

    // –>

    Home – Toni Truesdale

    >

     
     

    <!–
    httpReq = getHttpReq();

    if (httpReq) {
    xmlDoc = getXmlDoc(httpReq, "photos.xml");

    if (xmlDoc) {
    photos = xmlDoc.getElementsByTagName("photo");

    SLIDEFLOW_DATA['containerElement'] = $('slideflow');

    SLIDEFLOW_DATA['images'] = new Array();

    for (var i=0; i

  38. April sagt:

    Very nice script but not working in IE. is there a fix?

  39. tebert sagt:

    Well…for me the example above works on IE 5.5/Windows 2000 up to IE 8/Windows 7. May be smoother on IE but the JavaScript implementation in IE is still crappy. Try using Safari, Chrome or FF instead if you think it is slow :)
    If the sample above doesn’t work for you please check your IE settings first to make sure JavaScript is enabled which it is in the default configuration.

  40. david sagt:

    empese con html hace 2 meses ……..

    en donde hay que introducir este codigo ? body ?

    luego hay que hacer algo mas ?

Kommentieren