Referencia de ActionScript® 3.0 para la plataforma de Adobe® Flash®
Inicio  |  Ocultar lista de paquetes y clases |  Paquetes  |  Clases  |  Novedades  |  Índice  |  Apéndices  |  ¿Por qué hay texto en inglés?
Filtros: Recuperando datos del servidor...
Recuperando datos del servidor...
org.osmf.traits 

PlayTrait  - AS3 OSMF

Paqueteorg.osmf.traits
Clasepublic class PlayTrait
HerenciaPlayTrait Inheritance MediaTraitBase Inheritance EventDispatcher Inheritance Object

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

PlayTrait defines the trait interface for media whose playback can be started and stopped. It can be used as the base class for a more specific PlayTrait subclass.

Use the MediaElement.hasTrait(MediaTraitType.PLAY) method to query whether a media element has a trait of this type. If hasTrait(MediaTraitType.PLAY) returns true, use the MediaElement.getTrait(MediaTraitType.PLAY) method to get an object of this type.

Elementos de API relacionados



Propiedades públicas
 PropiedadDefinido por
  canPause : Boolean
[solo lectura] Indicates whether the media can be paused.
PlayTrait
 Inheritedconstructor : Object
Una referencia a la clase de objeto o función constructora para una instancia de objeto determinada.
Object
  playState : String
[solo lectura] The current playback state, of type PlayState.
PlayTrait
 InheritedtraitType : String
[solo lectura] The MediaTraitType for this trait.
MediaTraitBase
Métodos públicos
 MétodoDefinido por
  
Constructor.
PlayTrait
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un objeto de detector de eventos con un objeto EventDispatcher, de modo que el detector reciba la notificación de un evento.
EventDispatcher
 Inherited
Distribuye un evento en el flujo del evento.
EventDispatcher
 Inherited
Disposes of any resources used by this trait.
MediaTraitBase
 Inherited
Comprueba si el objeto EventDispatcher tiene detectores registrados para un tipo concreto de evento.
EventDispatcher
 Inherited
Indica si un objeto tiene definida una propiedad especificada.
Object
 Inherited
Indica si hay una instancia de la clase Object en la cadena de prototipo del objeto especificado como parámetro.
Object
  
Pauses the media if it is not already paused.
PlayTrait
  
Plays the media if it is not already playing.
PlayTrait
 Inherited
Indica si existe la propiedad especificada y si es enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Elimina un detector del objeto EventDispatcher.
EventDispatcher
 Inherited
Establece la disponibilidad de una propiedad dinámica para operaciones de bucle.
Object
  
Stops the media if it is not already stopped.
PlayTrait
 Inherited
Devuelve la representación de cadena de este objeto, con formato según las convenciones específicas de configuración regional.
Object
 Inherited
Devuelve la representación de cadena del objeto especificado.
Object
 Inherited
Devuelve el valor simple del objeto especificado.
Object
 Inherited
Comprueba si hay registrado un detector de eventos con este objeto EventDispatcher o con cualquiera de sus ascendientes para el tipo de evento concreto.
EventDispatcher
Métodos protegidos
 MétodoDefinido por
  
Called just after the playState property value has changed.
PlayTrait
  
Called immediately before the playState property value is changed.
PlayTrait
  
Sets the canPause property for this PlayTrait.
PlayTrait
Eventos
 Evento Resumen Definido por
 Inherited[evento broadcast] Se distribuye cuando Flash Player o AIR pasan a estar activos.EventDispatcher
  Dispatched when the canPause property has changed.PlayTrait
 Inherited[evento broadcast] Se distribuye cuando Flash Player o de AIR pasan a estar inactivos.EventDispatcher
  Dispatched when playback resumes after a live stallPlayTrait
  Dispatched when playback runs out of content for a live stream but the stream is not done.PlayTrait
  Dispatched when the playState of the PlayTrait has changed.PlayTrait
Información sobre propiedades

canPause

propiedad
canPause:Boolean  [solo lectura]

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Indicates whether the media can be paused. If false, then the pause() method is not supported.



Implementación
    public function get canPause():Boolean

playState

propiedad 
playState:String  [solo lectura]

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

The current playback state, of type PlayState.



Implementación
    public function get playState():String
Información sobre constructores

PlayTrait

()Información sobre
public function PlayTrait()

Constructor.

Información sobre métodos

pause

()método
public final function pause():void

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Pauses the media if it is not already paused.


Emite
IllegalOperationError — If canPause returns false.

play

()método 
public final function play():void

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Plays the media if it is not already playing.

playStateChangeEnd

()método 
protected function playStateChangeEnd():void

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Called just after the playState property value has changed. Dispatches the change event.

Subclasses that override should call this method to dispatch the relevant PlayEvent.

playStateChangeStart

()método 
protected function playStateChangeStart(newPlayState:String):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Called immediately before the playState property value is changed.

Subclasses can override this method to communicate the change to the media.

Parámetros

newPlayState:String

setCanPause

()método 
protected final function setCanPause(value:Boolean):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Sets the canPause property for this PlayTrait.

Parámetros

value:Boolean

stop

()método 
public final function stop():void

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Stops the media if it is not already stopped.

When media is stopped, then any subsequent call to play should start from the beginning (though this is up to the actual implementation).

Información sobre eventos

canPauseChange

Evento
Tipo de objeto de evento: org.osmf.events.PlayEvent
propiedad PlayEvent.type = org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Dispatched when the canPause property has changed.

The PlayEvent.CAN_PAUSE_CHANGE constant defines the value of the type property of the event object for a canPauseChange event.

liveResume

Evento  
Tipo de objeto de evento: org.osmf.events.PlayEvent
propiedad PlayEvent.type = org.osmf.events.PlayEvent.LIVE_RESUME

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 2.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Dispatched when playback resumes after a live stall

The PlayEvent.LIVE_RESUME constant defines the value of the type property of the event object for a liveResume event.

Dispatched when playback resumes after a live stall

liveStall

Evento  
Tipo de objeto de evento: org.osmf.events.PlayEvent
propiedad PlayEvent.type = org.osmf.events.PlayEvent.LIVE_STALL

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 2.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Dispatched when playback runs out of content for a live stream but the stream is not done.

The PlayEvent.LIVE_STALL constant defines the value of the type property of the event object for a liveStall event.

Dispatched when playback runs out of content for a live stream but the stream is not done.

playStateChange

Evento  
Tipo de objeto de evento: org.osmf.events.PlayEvent
propiedad PlayEvent.type = org.osmf.events.PlayEvent.PLAY_STATE_CHANGE

Versión del lenguaje: ActionScript 3.0
Versión de producto: OSMF 1.0
Versiones de motor de ejecución: Flash Player 10, AIR 1.5

Dispatched when the playState of the PlayTrait has changed.

The PlayEvent.PLAY_STATE_CHANGE constant defines the value of the type property of the event object for a playStateChange event.




[ X ]¿Por qué hay texto en inglés?
Cierto contenido de la Referencia de ActionScript 3.0 se muestra en inglés

No todo el contenido de la Referencia de ActionScript 3.0 se traduce a todos los idiomas. Si un elemento del lenguaje no se traduce, aparecerá en inglés. Por ejemplo, la clase ga.controls.HelpBox no está traducida en ningún idioma. Por lo tanto, en la versión en español de la referencia, la clase ga.controls.HelpBox aparecerá en inglés.