Paket | org.osmf.elements |
Sınıf | public class ProxyElement |
Miras Alma | ProxyElement ![]() ![]() ![]() |
Alt Sınıflar | DurationElement, LoadFromDocumentElement |
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 |
ProxyElement is not instantiated directly but rather used as the base class for creating wrappers for specific purposes. ProxyElement can be subclassed for any trait type or set of trait types. The subclass controls access to the proxied element either by overriding one or more of the proxied element's traits or by blocking them.
To override any of the proxied element's traits, the subclass creates its own trait instances, which it substitutes for the proxied element's traits that it wishes to override.
To block traits, the subclass prevents the traits of
the proxied element from being exposed by setting the ProxyElement's
blockedTraits
property for the trait
types that it wants to block.
This causes the proxied element's hasTrait()
method to return false
and its
getTrait()
method to return null
for the blocked trait types.
A ProxyElement normally dispatches the proxied element's events, unless the trait's type is among those that are blocked by the ProxyElement.
ProxyElement subclasses are useful for modifying the behavior of a MediaElement in a non-invasive way. An example would be adding temporal capabilities to a set of ImageElements to present them in a slide show in which the images are displayed for a specified duration. The ProxyElement subclass would proxy the non-temporal ImageElements and override the proxied element's TimeTrait to return a custom instance of that trait. A similar approach can be applied to other traits, either to provide an alternate implementation of some of the proxied element's underlying traits, to provide an implementation when a needed underlying trait does not exist, or to prevent an underlying trait from being exposed at all.
İlgili API Öğeleri
Özellik | Tanımlayan: | ||
---|---|---|---|
![]() | constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | |
![]() | metadataNamespaceURLs : Vector.<String> [salt okunur]
A Vector containing the namespace URLs for all Metadata
objects stored within this MediaElement. | MediaElement |
Özellik | Tanımlayan: |
---|
Yöntem | Tanımlayan: | ||
---|---|---|---|
![]() | 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 | |
![]() |
Olay akışına bir olay gönderir. | EventDispatcher | |
![]() |
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder. | EventDispatcher | |
![]() |
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | |
![]() |
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | |
![]() |
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | |
![]() |
EventDispatcher nesnesinden bir dinleyiciyi kaldırır. | EventDispatcher | |
![]() |
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | |
![]() |
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | |
![]() |
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | Object | |
![]() |
Belirtilen nesnenin temel değerini döndürür. | Object | |
![]() |
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 |
Tue Jun 12 2018, 01:09 PM Z