DHTML Lab - dhtmlab.com - Dynamic Headline Fader, Version 3.0 | 7 | WebReference

DHTML Lab - dhtmlab.com - Dynamic Headline Fader, Version 3.0 | 7

Logo

Dynamic Headline Fader, Version 3.0
excluding the IE Blend Transition Filter


Recall that in Explorer, the "fade" effect is achieved by invoking the built-in Blend Transition Filter. Built-in, that is, in Explorer for Windows. Explorer for Macintosh always had a "Flippin' Fader," so to speak.

In Version 2.01, we assigned the filter and then checked to see if we were successful in FDRinit():

with (elFader.style) {
    .
    .
    .	
    filter = "blendTrans(duration=" + FDRblendDur + ")";
}
...
IEhasFilters = (elFader.filters.blendTrans) ? true : false;

The IEhasFilters variable reflects the existence of a filter. It is true if IE for Windows is being used. It is false if:

  1. The browser used is IE for Macintosh.
  2. The browser used is IE4.x for Windows, running in Compatibility Mode.
  3. The browser used is IE4+ for Windows, but filter support is broken.

We discussed this in detail in Column 25, Addendum I

In Version 3, we will assign the filter only if a fader is required:

with (elFader.style) {
    .
    .
    .
    if(!FDRjustFlip) filter = "blendTrans(duration=" + FDRblendDur + ")";
}
...
IEhasFilters = (elFader.filters.blendTrans) ? true : false;

IEhasFilters now has a fourth reason for being false:

  1. No fade effect required.

Later, in FDRfade(), we refer to IEhasFilters when applying the filter:

  if(IEhasFilters) elFader.filters.blendTrans.Apply();
  elFader.innerHTML = newsStr;
  if(IEhasFilters) elFader.filters.blendTrans.Play();

Therefore, if a simple flip of headlines is called for, the filter-related statements are ignored and only the Fader's content is changed.

Let's move on to a new feature: multiple headline display per fade (or flip).


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Nov 30, 1999
Revised: Nov 30, 1999

URL: http://www.webreference.com/dhtml/column27/fade3flipie.html