PDA

View Full Version : Simple Controls Gallery Tweaks



kunwarbs
10-09-2009, 11:43 AM
1) Script Title: Simple Controls Gallery v1.3

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem:

i. I want to show up two images at a time in the gallery. The default configuration show up only one photo at a time. How?

ii. Can I set up the default photo which appears when the gallery loads? How?

Any help would be greatly appreciated.

ddadmin
10-09-2009, 11:32 PM
Hmm for 1) there's no easy way unfortunately apart from the obvious of combining two images into one using say Photoshop. For 2), are you asking how to have a different image other than the 1st show up when the page first loads?

kunwarbs
10-11-2009, 07:49 AM
1) there's no easy way unfortunately apart from the obvious of combining two images into one using say Photoshop.
That wouldn't make things work for me as I can't link those two images to different urls.


2), are you asking how to have a different image other than the 1st show up when the page first loads?
Yes, I did mean that. any clue how to do that?

ddadmin
10-14-2009, 02:59 AM
Yes, I did mean that. any clue how to do that?

There are a few ways to go about this. You can use the navigate() (http://www.dynamicdrive.com/dynamicindex4/simplegallery_suppliment.htm) method and call it inside the oninit() event to go to the desired slide when the gallery has fully loaded. For example, the below goes to the 2nd slide automatically when the gallery loads:


var mygallery=new simpleGallery({
wrapperid: "simplegallery", //ID of main gallery container,
dimensions: [400, 265], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["amster1.jpg", "http://en.wikipedia.org/wiki/Summer", "_new", ""],
["amster2.jpg", "http://en.wikipedia.org/wiki/Winter", "", ""],
["amster3.jpg", "", "", ""],
["amster4.jpg", "", "", ""]
],
autoplay: [false, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: true,
fadeduration: 1000, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
},
onslide:function(curslide, i){ //event that fires after each slide is shown
mygallery.navigate(1)
}
})

avidb
10-28-2009, 07:59 PM
Hmm for 1) there's no easy way unfortunately apart from the obvious of combining two images into one using say Photoshop.


Is there a hard way to have two images show up at the same time and scroll through them? If so what is it?

ddadmin
10-29-2009, 01:02 AM
Well it's definitely possible, but basically you're looking at modifying a good chunk of the original code to accomplish it. This is a request that should be more realistically posted in the DD Paid Requests forum (http://www.dynamicdrive.com/forums/forumdisplay.php?f=29).