Adobe® Flash® Platform için ActionScript® 3.0 Başvurusu
Ana Sayfa  |  Paket ve Sınıf Listesini Gizle |  Paketler  |  Sınıflar  |  Yenilikler  |  Dizin  |  Ekler  |  Niçin İngilizce?
Filtreler: Sunucudan Veri Alınıyor...
Sunucudan Veri Alınıyor...
org.osmf.traits 

TraitEventDispatcher  - AS3 OSMF

Paketorg.osmf.traits
Sınıfpublic class TraitEventDispatcher
Miras AlmaTraitEventDispatcher Inheritance EventDispatcher Inheritance Object
Alt Sınıflar MediaPlayer

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

TraitEventDispatcher is a utility class that exposes a uniform interface for receiving trait events from a MediaElement. This class monitors the MediaElement for traits being added and removed, and dispatches any events that the MediaElement's traits dispatch, and for which the client has registered listeners.

Örnekleri görüntüle



Genel Özellikler
 ÖzellikTanımlayan:
 Inheritedconstructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru.
Object
  media : MediaElement
The MediaElement which will be monitored, and whose trait events will be redispatched.
TraitEventDispatcher
Genel Yöntemler
 YöntemTanımlayan:
  
Constructor.
TraitEventDispatcher
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder.
EventDispatcher
 Inherited
Olay akışına bir olay gönderir.
EventDispatcher
 Inherited
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder.
EventDispatcher
 Inherited
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir.
Object
 Inherited
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir.
Object
 Inherited
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventDispatcher nesnesinden bir dinleyiciyi kaldırır.
EventDispatcher
 Inherited
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar.
Object
 Inherited
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür.
Object
 Inherited
Belirtilen nesnenin dize olarak temsil edilen halini döndürür.
Object
 Inherited
Belirtilen nesnenin temel değerini döndürür.
Object
 Inherited
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder.
EventDispatcher
Olaylar
 Olay Özet Tanımlayan:
 Inherited[broadcast olayı] Flash Player veya AIR uygulaması işletim sistemi odağına gelip etkin olduğunda gönderilir.EventDispatcher
  Dispatched when an alternative audio stream switch is requested, completed, or has failed.TraitEventDispatcher
  Dispatched when the autoSwitch property has changed.TraitEventDispatcher
  Dispatched when the buffering property has changed.TraitEventDispatcher
  Dispatched when the bufferTime property has changed.TraitEventDispatcher
  Dispatched when the bytesTotal property has changed.TraitEventDispatcher
  Dispatched when the canPause property has changed.TraitEventDispatcher
  Dispatched when the media has completed playback.TraitEventDispatcher
 Inherited[broadcast olayı] Çalışan Flash Player veya AIR uygulaması sistem odağını kaybettiğinde ve etkin olmayan duruma geldiğinde gönderilir.EventDispatcher
  Dispatched when the displayObject property of the media has changed.TraitEventDispatcher
  Dispatched when the state of the DRMTrait has changed.TraitEventDispatcher
  Dispatched when the duration property of the media has changed.TraitEventDispatcher
  Dispatched when the isRecording property has changed.TraitEventDispatcher
  Dispatched when the state of the LoadTrait has changed.TraitEventDispatcher
  Dispatched when the mediaWidth and/or mediaHeight property of the media has changed.TraitEventDispatcher
  Dispatched when the muted property of the media has changed.TraitEventDispatcher
  Dispatched when the number of alternative audio streams has changed.TraitEventDispatcher
  Dispatched when the number of dynamic streams has changed.TraitEventDispatcher
  Dispatched when the pan property of the media has changed.TraitEventDispatcher
  Dispatched when the playing or paused property of the media has changed.TraitEventDispatcher
  Dispatched when the seeking property of the media has changed.TraitEventDispatcher
  Dispatched when a dynamic stream switch change occurs.TraitEventDispatcher
  Dispatched when the volume property of the media has changed.TraitEventDispatcher
Özellik Ayrıntısı

media

özellik
media:MediaElement

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

The MediaElement which will be monitored, and whose trait events will be redispatched.



Uygulama
    public function get media():MediaElement
    public function set media(value:MediaElement):void
Yapıcı Ayrıntı

TraitEventDispatcher

()Yapıcı
public function TraitEventDispatcher()

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Constructor.

Olay Ayrıntısı

audioSwitchingChange

Olay
Olay Nesne Türü: org.osmf.events.AlternativeAudioEvent
özellik AlternativeAudioEvent.type = org.osmf.events.AlternativeAudioEvent.AUDIO_SWITCHING_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.6
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when an alternative audio stream switch is requested, completed, or has failed.

Dispatched when the switching state of the alternative audio stream has changed. Usually for any successful switching operation, two AUDIO_SWITCHING_CHANGE events will be triggered. One when the switch operation starts ( the switching property will be set to true ) and one when the operation ends ( the switching property will be set to false ).

autoSwitchChange

Olay  
Olay Nesne Türü: org.osmf.events.DynamicStreamEvent
özellik DynamicStreamEvent.type = org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the autoSwitch property has changed.

The DynamicStreamEvent.AUTO_SWITCH_CHANGE constant defines the value of the type property of the event object for an autoSwitchChange event.

bufferingChange

Olay  
Olay Nesne Türü: org.osmf.events.BufferEvent
özellik BufferEvent.type = org.osmf.events.BufferEvent.BUFFERING_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the buffering property has changed.

The BufferEvent.BUFFERING_CHANGE constant defines the value of the type property of the event object for a bufferingChange event.

bufferTimeChange

Olay  
Olay Nesne Türü: org.osmf.events.BufferEvent
özellik BufferEvent.type = org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the bufferTime property has changed.

The BufferEvent.BUFFER_TIME_CHANGE constant defines the value of the type property of the event object for a bufferTimeChange event.

bytesTotalChange

Olay  
Olay Nesne Türü: org.osmf.events.LoadEvent
özellik LoadEvent.type = org.osmf.events.LoadEvent

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the bytesTotal property has changed.

canPauseChange

Olay  
Olay Nesne Türü: org.osmf.events.PlayEvent
özellik PlayEvent.type = org.osmf.events.PlayEvent.CAN_PAUSE_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: 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.

complete

Olay  
Olay Nesne Türü: org.osmf.events.TimeEvent
özellik TimeEvent.type = org.osmf.events.TimeEvent.COMPLETE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the media has completed playback.

The TimeEvent.COMPLETE constant defines the value of the type property of the event object for a complete event.

displayObjectChange

Olay  
Olay Nesne Türü: org.osmf.events.DisplayObjectEvent
özellik DisplayObjectEvent.type = org.osmf.events.DisplayObjectEvent.DISPLAY_OBJECT_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the displayObject property of the media has changed.

The DisplayObjectEvent.DISPLAY_OBJECT_CHANGE constant defines the value of the type property of the event object for a displayObjectChange event.

drmStateChange

Olay  
Olay Nesne Türü: org.osmf.events.DRMEvent
özellik DRMEvent.type = org.osmf.events.DRMEvent.DRM_STATE_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10.1, AIR 1.5

Dispatched when the state of the DRMTrait has changed.

The DRMEvent.DRM_STATE_CHANGE constant defines the value of the type property of the event object for a change to the drmState of a DRMTrait.

durationChange

Olay  
Olay Nesne Türü: org.osmf.events.TimeEvent
özellik TimeEvent.type = org.osmf.events.TimeEvent.DURATION_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the duration property of the media has changed.

The TimeEvent.DURATION_CHANGE constant defines the value of the type property of the event object for a durationChange event.

isRecordingChange

Olay  
Olay Nesne Türü: org.osmf.events.DVREvent
özellik DVREvent.type = org.osmf.events.DVREvent.IS_RECORDING_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10.1, AIR 1.5

Dispatched when the isRecording property has changed.

The DVREvent.IS_RECORDING_CHANGE constant defines the value of the type property of the event object for an isRecordingChange event.

loadStateChange

Olay  
Olay Nesne Türü: org.osmf.events.LoadEvent
özellik LoadEvent.type = org.osmf.events.LoadEvent.LOAD_STATE_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the state of the LoadTrait has changed.

The LoadEvent.LOAD_STATE_CHANGE constant defines the value of the type property of the event object for a loadStateChange event.

mediaSizeChange

Olay  
Olay Nesne Türü: org.osmf.events.DisplayObjectEvent
özellik DisplayObjectEvent.type = org.osmf.events.DisplayObjectEvent.MEDIA_SIZE_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the mediaWidth and/or mediaHeight property of the media has changed.

The DisplayObjectEvent.MEDIA_SIZE_CHANGE constant defines the value of the type property of the event object for a mediaSizeChange event.

mutedChange

Olay  
Olay Nesne Türü: org.osmf.events.AudioEvent
özellik AudioEvent.type = org.osmf.events.AudioEvent.MUTED_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the muted property of the media has changed.

The AudioEvent.MUTED_CHANGE constant defines the value of the type property of the event object for a mutedChange event.

numAlternativeAudioStreamsChange

Olay  
Olay Nesne Türü: org.osmf.events.AlternativeAudioEvent
özellik AlternativeAudioEvent.type = org.osmf.events.AlternativeAudioEvent.NUM_ALTERNATIVE_AUDIO_STREAMS_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.6
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the number of alternative audio streams has changed.

Dispatched when the number of available alternative audio streams has changed..

numDynamicStreamsChange

Olay  
Olay Nesne Türü: org.osmf.events.DynamicStreamEvent
özellik DynamicStreamEvent.type = org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the number of dynamic streams has changed.

The DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE constant defines the value of the type property of the event object for a numDynamicStreamsChange event.

panChange

Olay  
Olay Nesne Türü: org.osmf.events.AudioEvent
özellik AudioEvent.type = org.osmf.events.AudioEvent.PAN_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the pan property of the media has changed.

The AudioEvent.PAN_CHANGE constant defines the value of the type property of the event object for a panChange event.

playStateChange

Olay  
Olay Nesne Türü: org.osmf.events.PlayEvent
özellik PlayEvent.type = org.osmf.events.PlayEvent.PLAY_STATE_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the playing or paused property of the media has changed.

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

seekingChange

Olay  
Olay Nesne Türü: org.osmf.events.SeekEvent
özellik SeekEvent.type = org.osmf.events.SeekEvent.SEEKING_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the seeking property of the media has changed.

The SeekEvent.SEEKING_CHANGE constant defines the value of the type property of the event object for a seekingChange event.

switchingChange

Olay  
Olay Nesne Türü: org.osmf.events.DynamicStreamEvent
özellik DynamicStreamEvent.type = org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when a dynamic stream switch change occurs.

The DynamicStreamEvent.SWITCHING_CHANGE constant defines the value of the type property of the event object for a switchingChange event.

volumeChange

Olay  
Olay Nesne Türü: org.osmf.events.AudioEvent
özellik AudioEvent.type = org.osmf.events.AudioEvent.VOLUME_CHANGE

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: OSMF 1.0
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Dispatched when the volume property of the media has changed.

The AudioEvent.VOLUME_CHANGE constant defines the value of the type property of the event object for a volumeChange event.
TraitEventDispatcherExample.as

package
{
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    
    import org.osmf.elements.VideoElement;
    import org.osmf.events.AudioEvent;
    import org.osmf.events.PlayEvent;
    import org.osmf.media.MediaPlayerSprite;
    import org.osmf.media.URLResource;
    import org.osmf.traits.TraitEventDispatcher;
    
    public class TraitEventDispatcherExample extends Sprite
    {
        public function TraitEventDispatcherExample()
        {
            super();
            
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            
            var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite();
            var urlResource:URLResource = new URLResource("rtmp://cp67126.edgefcs.net/ondemand/mediapm/strobe/content/test/SpaceAloneHD_sounas_640_500_short");
            var videoElement:VideoElement = new VideoElement();
            videoElement.resource = urlResource;

            var dispatcher:TraitEventDispatcher = new TraitEventDispatcher();
            dispatcher.media = videoElement;
                        
            dispatcher.addEventListener(AudioEvent.VOLUME_CHANGE, onVolumeChange); 
            dispatcher.addEventListener(PlayEvent.PLAY_STATE_CHANGE, onPlayStateChange);             

            addChild(mediaPlayerSprite);
            mediaPlayerSprite.media = videoElement;    
        }

        private function onVolumeChange(event:AudioEvent):void
        {
            trace("onVolumeChange");
        }

        private function onPlayStateChange(event:PlayEvent):void
        {
            trace("onPlayStateChange");
        }
    }
}




[ X ]Niçin İngilizce?
ActionScript 3.0 Başvurusu'ndaki içerik İngilizce görünür

ActionScript 3.0 Başvurusu'nun tüm bölümleri tüm dillere çevrilmemiştir. Bir dil öğesi çevrilmediğinde İngilizce görünür. Örneğin, ga.controls.HelpBox sınıfı hiçbir dile çevrilmez. Bu nedenle, başvurunun Türkçe versiyonunda ga.controls.HelpBox sınıfı İngilizce görünür.