PDA

View Full Version : One Stop Slide Show



vwphillips
09-21-2010, 03:41 PM
1) CODE TITLE: One Stop Slide Show

2) AUTHOR NAME/NOTES: see Link

3) DESCRIPTION:

A slide show with eighteen modes of execution
plus 'random' to randomly change the mode.
0 = opacity,
1 = slide in/out right,
2 = slide in/out left,
3 =slide in/out down,
4 = slide in/out up,
5 = slide in right,
6 = slide in left,
7 = slide in down,
8 = slide in up,
9 = left top,
10 = right top,
11 = right bottom,
12 = left bottom,
13 = horizontal blind,
14 = vertical blind,
15 = square in,
16 = square out,
17 = Simple Swap,
100 = random.
The slide show content may be defined by the HTML code or if images by an array during initialisation.
With optional Pagination, slide in panels, add event calls and persistance to remember the last frame.

The script utilises my animator script 'zxcAnimate' (http://www.vicsjavascripts.org.uk/Animate/Animate.htm)
4) URL TO CODE: http://www.vicsjavascripts.org.uk/OneStopSlideShow/OneStopSlideShow.htm

or, ATTACHED BELOW (see #3 in guidelines below):

molendijk
09-22-2010, 12:13 AM
Very nice in non-IE. Not very smooth in IE.
===
Arie Molendijk

djr33
09-22-2010, 12:51 AM
Lots of options. Impressive.

jscheuer1
09-22-2010, 04:11 AM
Very nice in non-IE. Not very smooth in IE.
===
Arie Molendijk

In IE 8, I agree. I wouldn't want it. However, in compatibility mode (more like IE 7) it's fine. Though not an ideal solution, a meta tag or PHP header may be used to force compatibility mode.

If when coding this Vic you made certain special considerations for IE 7 to get it to work right in it (other than alpha opacity filter for fading, if any), perhaps removing these for IE 8 and above would solve this jerkiness issue in those browsers.

I often find that, other than filter for fading, IE 8 behaves more like other browsers (Opera, Safari, Firefox) than it does like IE 7.

vwphillips
09-22-2010, 11:49 AM
I have updated the script to limit the animation calls to those required for the effect in stead of all five

I do not use IE8

will this resolve resolve the opacity issue?


function zxcOpacity(obj,opc){
if (opc<0||opc>100) return;
if (document.defaultView&&document.defaultView.getComputedStyle){
obj.style.opacity=obj.style.MozOpacity=obj.style.WebkitOpacity=obj.style.KhtmlOpacity=opc/100-.001;
}
else {
obj.style.filter='alpha(opacity='+opc+')';
}
}

jscheuer1
09-22-2010, 01:41 PM
I never said there was an opacity issue. If there was, it's fine now.

Also, the jerkiness in IE 8 is reduced. Before it always happened. Now only when two or more shows are transitioning at the same time. This is regardless of the transition type.

vwphillips
09-22-2010, 03:45 PM
thanks for the feedback
I guess it is alot to expect six examples to change at once, I will stagger the Auto Hold duration of my examples.

jscheuer1
09-22-2010, 05:04 PM
The funny thing is that it transitions fine in IE 8 when IE 7 compatibility mode is used.

This leads me to believe (as is often the case with IE 7 and earlier, but perhaps not in your code) that you needed to branch for IE to get it to work right, like probably in your zxcAnimate unit. If so, these branches (except for those dealing with opacity) should be closed to IE 8, as it behaves in most other respects more like Firefox and others than like earlier IE browsers do.

For example, I have a code (snippet only here):


var isPaused = false, overflow, ie7 = 0, removeFilter;
/*@cc_on @*/
/*@if(@_jscript_version >= 5)
ie7 = $.browser.version < 8? 16 : 0;
@end @*/

This allows me later to apply a fudge for the extra offset IE 7 and earlier render in their box model for, in this case the li element. IE 8 doesn't have this problem, so it will have the same value as all others here, 0.

Full code:

http://home.comcast.net/~jscheuer1/side/news_ticker/up.htm

molendijk
09-22-2010, 09:08 PM
Will this resolve resolve the opacity issue?

function zxcOpacity(obj,opc){
if (opc<0||opc>100) return;
if (document.defaultView&&document.defaultView.getComputedStyle){
obj.style.opacity=obj.style.MozOpacity=obj.style.WebkitOpacity=obj.style.KhtmlOpacity=opc/100-.001;
}
else {
obj.style.filter='alpha(opacity='+opc+')';
}
}

On my machine using IE8, the animation still a bit jerky.
===
Arie.

vwphillips
09-23-2010, 09:22 AM
again thank you for the feedback

It looks as if I am forced to upgrade??? to IE8 to see what is going on

my animator is so simple, why does only IE find it so difficult?