Freigeben über


isActive property

Gets a value that indicates whether the element is currently active on the timeline.

Syntax

JScript
p = object.isActive

 

Property values

Type: Boolean

One of the values in the Property Values section.

Examples

This example uses the isActive property to get a value that indicates whether the media element is active on the timeline.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/isActive.htm

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>isActive Property</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">

<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
function checkIsActive(){
    isActive1.innerText='isActive: ' + m1.currTimeState.isActive;
    if(m1.currTimeState.isActive){
        b0.disabled=true;
        b1.disabled=false;
    }else{
        b0.disabled=false;
        b1.disabled=true;
    }
}
</SCRIPT>
</HEAD>

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

<t:video id="m1" begin="0;indefinite;"
    src="/workshop/samples/author/behaviors/media/shuttle3.wmv"
    onend="checkIsActive();" onbegin="checkIsActive();" fill="remove"/>

<BR><BR>
<SPAN id="isActive1">isActive:</SPAN>
<BR>

<BUTTON id="b0" onclick="m1.beginElement();">Restart</BUTTON>
<BUTTON id="b1" onclick="m1.endElement();">Stop</BUTTON>

</BODY>
</HTML>

See also

currTimeState

Reference

activeElements

isOn

isPaused

state

stateString

Conceptual

Introduction to HTML+TIME