Freigeben über


duration Attribute | Duration Property

This topic documents a feature of Visual Filters and Transitions, which is deprecated as of Windows Internet Explorer 9.

Sets or retrieves the length of time the transition takes to complete.

Syntax

HTML
{ filter:progid:DXImageTransform.Microsoft.filter-name(
    duration = fDuration ... ) ... }
Scripting
object.filters.item(
    "DXImageTransform.Microsoft.filter-name").Duration [ = fDuration ]

Possible Values

fDuration A Floating-point value that specifies the length of time to complete the transition. The value is specified in seconds.milliseconds format (0.0000).

The property is read/write. The property has no default value.

Remarks

You can set the playback duration for a transition as a parameter of the play method. After you invoke the play method, the Duration property becomes read-only for the duration of the playback.

Example

This example uses the duration attribute and the Blinds filter to reveal one image replacing another during a two-second interval. Click the button to reveal the second image.

<SCRIPT LANGUAGE=JavaScript>
var sInitialSRC="/workshop/samples/author/dhtml/graphics/clouds.jpg";
var sFinalSRC="/workshop/samples/author/dhtml/graphics/circles.gif";
function doTrans()
{
theImg.filters.item(0).Apply();
theImg.src=sFinalSRC;
sFinalSRC=sInitialSRC;
sInitialSRC=theImg.src;
theImg.filters.item(0).Play();
}
</SCRIPT>

<IMG ID="theImg" src='/workshop/samples/author/dhtml/graphics/clouds.jpg'; 
    style="width:200; height:200;
        filter:progid:DXImageTransform.Microsoft.Blinds(Duration=2)">
<BR/><BR/>
<INPUT TYPE="button" value="Start Transition" onClick="doTrans()">

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/overview/filt_06.htm

Applies To

BlendTrans, RevealTrans, Barn, Blinds, Fade, GradientWipe, Inset, Iris, Pixelate, RadialWipe, RandomBars, RandomDissolve, Slide, Spiral, Stretch, Strips, Wheel, Zigzag