|
This page documents a feature of HTML+TIME 1.0, which was released in Microsoft?Internet Explorer 5. We recommend that you migrate your content to the latest version of HTML+TIME, which implements the SMIL 2.0 Working Draft. See the Introduction to HTML+TIME overview for more information. Retrieves an object indicating whether the specified Microsoft?DirectAnimation?behavior is running. Syntax HTML | N/A |
---|
Scripting | [ oOn = ] object.onOffBehavior |
---|
Possible Values oOn |
DirectAnimation Boolean (DABoolean) object that specifies one of the following values. true | Behavior is running. | false | Behavior is not running. |
|
The property is read-only.
The property has no default value.
Remarks This property is deprecated. This property allows you to incorporate multimedia elements, such as 2-D and 3-D animated images and sounds, into an HTML page using the anim:DA element. The object this property is applied to must be an HTML object with a valid HTML+TIME (Timed Interactive Multimedia Extensions) timeline. Use this property with HTML+TIME timelines to control DirectAnimation content. This property is not part of the HTML+TIME specification.
Note To ensure that pages using this property display properly in Microsoft Internet Explorer, complete the following steps.
- Use #time instead of #default#time for the behavior declaration.
- Include the time object in your page. The class identifier used to specify this object is 476C391C-3E0D-11D2-B948-00C04FA32195.
These actions are necessary only for pages that use HTML+TIME timelines to control DirectAnimation content.
Example
This example attaches a timeline specified with HTML+TIME to an image animated with DirectAnimation. The onOffBehavior property is used to display one image while the animation is running, and to display a different image while the animation is stopped. <HTML>
<HEAD>
<TITLE>progressBehavior</TITLE>
<XML:NAMESPACE PREFIX="anim"/>
<STYLE>
.time { behavior: url(#time); }
anim\:DA { behavior: url(#default#anim); }
</STYLE>
<OBJECT ID="time" CLASSID="CLSID:476C391C-3E0D-11D2-B948-00C04FA32195">
</OBJECT>
</HEAD>
<BODY>
<P>An image of the sun is displayed before the DirectAnimation
behavior starts. Five seconds later, a new image replaces the
image of the sun. The new image fades out during five seconds
of animation, and the original image of the sun reappears.</P>
<SPAN ID="spanImg" CLASS="time" t:TIMEACTION="visibility" t:BEGIN="5"
t:DUR="5">
</SPAN>
<DIV ALIGN="center">
<anim:DA ID="da1" STYLE="width:504; height:126; z-index: -1;" />
</DIV>
<BR>
<BUTTON onclick="spanImg.beginElement();">Restart</BUTTON>
<SCRIPT LANGUAGE="JScript">
<!--
// Assign a variable to the DA statics library
m = da1.statics;
// Create the DAImages
img1 = m.ImportImage("../../common/solarsys.gif");
img2 = m.ImportImage("../../common/sun.gif");
// Display image 1 while the behavior is running, and
// image 2 while it is stopped.
img3 = m.Cond(spanImg.onOffBehavior, img1, img2)
// Animate the opacity of the image from 100% to 0%, based on the
// progress of the time behavior. Use (1 - progress) to get the
// proper opacity.
img4 = img3.OpacityAnim(m.Sub(m.DANumber(1),spanImg.progressBehavior));
// Set the image of the DA Object to be the final image behavior
da1.image = img4;
//-->
</SCRIPT>
</BODY>
</HTML> This feature requires Microsoft?Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample. 
Standards Information
This property is defined in
HTML+TIME 1.0 .
Applies To |
A,
ADDRESS,
B,
BIG,
BLOCKQUOTE,
BODY,
BUTTON,
CAPTION,
CENTER,
CITE,
CODE,
COL,
COLGROUP,
currentStyle,
CUSTOM,
DD,
DFN,
DIR,
DIV,
DL,
DT,
EM,
FIELDSET,
FORM,
hn,
HTML,
I,
IFRAME,
IMG,
INPUT type=button,
INPUT type=checkbox,
INPUT type=file,
INPUT type=image,
INPUT type=password,
INPUT type=radio,
INPUT type=reset,
INPUT type=submit,
INPUT type=text,
ISINDEX,
KBD,
LABEL,
LEGEND,
LI,
LISTING,
MARQUEE,
MENU,
OL,
OPTION,
P,
PLAINTEXT,
PRE,
runtimeStyle,
S,
SAMP,
SELECT,
SMALL,
SPAN,
STRIKE,
STRONG,
style,
SUB,
SUP,
TABLE,
TBODY,
TD,
TEXTAREA,
TFOOT,
TH,
THEAD,
TR,
TT,
U,
UL,
VAR,
XMP | |
See Also progressBehavior, timelineBehavior
|