Referência do ActionScript® 3.0 para Adobe® Flash® Platform
Início  |  Ocultar listas de Pacotes e Classes |  Pacotes  |  Classes  |  Novidades  |  Índice  |  Apêndices  |  Por que inglês?
Filtros: Recuperando dados do servidor...
Recuperando dados do servidor...
org.osmf.net 

NetClient  - AS3 OSMF

Pacoteorg.osmf.net
Classepublic dynamic class NetClient
HerançaNetClient Inheritance Proxy

Versão da linguagem: ActionScript 3.0
Versão de produto: OSMF 1.0
Versões de runtime: Flash Player 10, AIR 1.5

The NetClient class provides support for handling callbacks dynamically from an RTMP server that is streaming to a MediaElement that works with NetStream under the hood (such as VideoElement).

Use this class to listen for callbacks on the NetConnection and NetStream created by a NetLoader's load operation.

Assign the value of the client property of the NetConnection or NetStream to an instance of the NetClient class. Then use the NetClient's addHandler() and removeHandler() methods to register and unregister handlers for the NetStream callbacks.

Elementos da API relacionados



Métodos públicos
 MétodoDefinido por
  
addHandler(name:String, handler:Function, priority:int = 0):void
Adds a handler for the specified callback name.
NetClient
  
Removes a handler method for the specified callback name.
NetClient
Detalhes do método

addHandler

()método
public function addHandler(name:String, handler:Function, priority:int = 0):void

Versão da linguagem: ActionScript 3.0
Versão de produto: OSMF 1.0
Versões de runtime: Flash Player 10, AIR 1.5

Adds a handler for the specified callback name.

If multiple handlers register for the same callback, the result of the callback is an array holding the results of each handler's invocation.

This example sets up handler for the onMetaData callback.

         function onMetaData(value:Object):void
         {
               trace("Got metadata.");
         }
         
         var stream:NetStream;
         var client:NetClient = (stream.client as NetClient); //assign the stream to the NetClient
         client.addHandler("onMetaData", onMetaData); //add the handler
         

Parâmetros

name:String — Name of callback to handle.
 
handler:Function — Handler to add.
 
priority:int (default = 0)

removeHandler

()método 
public function removeHandler(name:String, handler:Function):void

Versão da linguagem: ActionScript 3.0
Versão de produto: OSMF 1.0
Versões de runtime: Flash Player 10, AIR 1.5

Removes a handler method for the specified callback name.

Parâmetros

name:String — Name of callback for whose handler is being removed.
 
handler:Function — Handler to remove.





[ X ]Por que inglês?
O conteúdo na Referência do ActionScript 3.0 aparece em inglês

Nem todas as partes da Referência do ActionScript 3.0 estão traduzidas em todos os idiomas. Quando um elemento de um idioma não está traduzido, ele é exibido em inglês. Por exemplo, a classe ga.controls.HelpBox não está traduzida em nenhum idioma. Por isso, na versão da referência em português do Brasil, a classe ga.controls.HelpBox é exibida em inglês.