| Pakiet | org.osmf.traits |
| Klasa | public class TimeTrait |
| Dziedziczenie | TimeTrait MediaTraitBase EventDispatcher Object |
| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.TIME) method to query
whether a media element has a trait of this type.
If hasTrait(MediaTraitType.TIME) returns true,
use the MediaElement.getTrait(MediaTraitType.TIME) method
to get an object that is of this type.
Powiązane elementy interfejsu API
| Właściwość | Zdefiniowane przez | ||
|---|---|---|---|
![]() | constructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu. | Object | |
| currentTime : Number [tylko do odczytu]
The current time of the media, in seconds. | TimeTrait | ||
| duration : Number [tylko do odczytu]
The duration of the media, in seconds. | TimeTrait | ||
![]() | traitType : String [tylko do odczytu]
The MediaTraitType for this trait. | MediaTraitBase | |
| Metoda | Zdefiniowane przez | ||
|---|---|---|---|
Constructor. | TimeTrait | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Rejestruje obiekt detektora zdarzeń w obiekcie EventDispatcher, dzięki czemu detektor będzie otrzymywał powiadomienia o zdarzeniu. | EventDispatcher | |
![]() |
Wywołuje zdarzenie, tj. kieruje je do przepływu zdarzeń. | EventDispatcher | |
![]() |
Disposes of any resources used by this trait. | MediaTraitBase | |
![]() |
Sprawdza, czy obiekt EventDispatcher zawiera jakiekolwiek detektory zarejestrowane dla konkretnego typu zdarzeń. | EventDispatcher | |
![]() |
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość. | Object | |
![]() |
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr. | Object | |
![]() |
Wskazuje, czy określona właściwość istnieje i jest przeliczalna. | Object | |
![]() |
Usuwa detektor z obiektu EventDispatcher. | EventDispatcher | |
![]() |
Ustawia dostępność właściwości dynamicznej używanej w pętlach. | Object | |
![]() |
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych. | Object | |
![]() |
Zwraca ciąg reprezentujący określony obiekt. | Object | |
![]() |
Zwraca pierwotną wartość dla określonego obiektu. | Object | |
![]() |
Sprawdza, czy detektor zdarzeń określonego typu jest zarejestrowany w tym obiekcie EventDispatcher lub jego elementach macierzystych. | EventDispatcher | |
| Metoda | Zdefiniowane przez | ||
|---|---|---|---|
Called just after the currentTime property has changed. | TimeTrait | ||
Called immediately before the currentTime property is changed. | TimeTrait | ||
Called just after the duration property has changed. | TimeTrait | ||
Called immediately before the duration property is changed. | TimeTrait | ||
Invoking this setter will result in the trait's currentTime
value changing if it differs from currentTime's current value. | TimeTrait | ||
Invoking this setter will result in the trait's duration
value changing if it differs from duration's current value. | TimeTrait | ||
| Zdarzenie | Podsumowanie | Zdefiniowane przez | ||
|---|---|---|---|---|
![]() | [zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja środowiska wykonawczego AIR uzyskuje fokus w systemie operacyjnym i przechodzi w stan aktywny. | EventDispatcher | ||
| Dispatched when the currentTime of the trait has changed to a value equal to its duration. | TimeTrait | |||
![]() | [zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja AIR traci fokus w systemie operacyjnym i przechodzi w stan nieaktywny. | EventDispatcher | ||
| Dispatched when the duration of the trait changed. | TimeTrait | |||
currentTime | właściwość |
duration | właściwość |
TimeTrait | () | Konstruktor |
currentTimeChangeEnd | () | metoda |
currentTimeChangeStart | () | metoda |
protected function currentTimeChangeStart(newCurrentTime:Number):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Called immediately before the currentTime property is changed.
Subclasses can override this method to communicate the change to the media.
Parametry
newCurrentTime:Number — New currentTime value.
|
durationChangeEnd | () | metoda |
protected function durationChangeEnd(oldDuration:Number):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Called just after the duration property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the durationChange event.
Parametry
oldDuration:Number — Previous duration value.
|
durationChangeStart | () | metoda |
protected function durationChangeStart(newDuration:Number):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Called immediately before the duration property is changed.
Subclasses can override this method to communicate the change to the media.
Parametry
newDuration:Number — New duration value.
|
setCurrentTime | () | metoda |
protected final function setCurrentTime(value:Number):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Invoking this setter will result in the trait's currentTime value changing if it differs from currentTime's current value.
Parametry
value:Number |
setDuration | () | metoda |
protected final function setDuration(value:Number):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Invoking this setter will result in the trait's duration value changing if it differs from duration's current value.
Parametry
value:Number |
complete | Zdarzenie |
org.osmf.events.TimeEventwłaściwość TimeEvent.type =
org.osmf.events.TimeEvent.COMPLETE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the currentTime of the trait has changed to a value equal to its duration.
The TimeEvent.COMPLETE constant defines the value of the type property of the event object for a complete event.durationChange | Zdarzenie |
org.osmf.events.TimeEventwłaściwość TimeEvent.type =
org.osmf.events.TimeEvent.DURATION_CHANGE| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | OSMF 1.0 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Dispatched when the duration of the trait changed.
The TimeEvent.DURATION_CHANGE constant defines the value of the type property of the event object for a durationChange event.Tue Jun 12 2018, 12:06 PM Z
Ukryj dziedziczone właściwości publiczne
Pokaż dziedziczone właściwości publiczne