Foros del Web » Creando para Internet » Flash y Actionscript »

Poner play off cuando arranca el Reproductor AAC

Estas en el tema de Poner play off cuando arranca el Reproductor AAC en el foro de Flash y Actionscript en Foros del Web. Soy nuevo en esto haci que voy directo al tema. Cuando se carga la pagina donde esta el reproductor directo se reproduce y yo no ...
  #1 (permalink)  
Antiguo 15/04/2012, 22:29
 
Fecha de Ingreso: abril-2012
Mensajes: 16
Antigüedad: 12 años
Puntos: 0
Poner play off cuando arranca el Reproductor AAC

Soy nuevo en esto haci que voy directo al tema.
Cuando se carga la pagina donde esta el reproductor directo se reproduce y yo no quiero eso quisiera que este como apagado y no como encendido es molesto que cuando entren a mi web directo se reproduzca la radio
este es el codigo del reproductor:
Código PHP:
function initialize()
{
    
_root.connect.streamStr.text "http://68.168.98.178:19587/";
    
_root.connect.connectStr.text "rtmp://199.187.122.194:1935/aacmundi";
    
_root.connect.connectButton.onPress _root.doConnect;
    
_root.connect.connectButton2.onPress _root.doConnect;
    
metaDataValues.title "";
    
metaDataValues.genre "";
    
metaDataValues.name "";
    
metaDataValues.url "";
    
doConnect();
    
trace (System.capabilities.version);
}
function 
updateMetaData()
{
    var 
_loc1 "";
    var 
_loc2 "#FFFFFF";
    var 
_loc3 "#FFFFFF";
    if (
metaDataValues.title != "")
    {
        
_loc1 _loc1 + ("<b><font size=\'10\' color=\'" _loc2 "\'>Sonando: </font></b><font color=\'" _loc3 "\'>" metaDataValues.title "</font>\n");
    } 
// end if
    
var _loc4 "";
    
_loc4 _loc4 metaDataValues.title;
    
robnei.text _loc4;
    if (
metaDataValues.genre != "")
    {
        
_loc1 _loc1 + ("<b><font size=\'10\' color=\'" _loc2 "\'>Genero: </font></b><font color=\'" _loc3 "\'>" metaDataValues.genre "</font>\n");
    } 
// end if
    
if (metaDataValues.name != "")
    {
        
_loc1 _loc1 + ("<b><font size=\'10\' color=\'" _loc2 "\'>Emisora: </font></b><font color=\'" _loc3 "\'>" metaDataValues.name "</font>\n");
    } 
// end if
    
if (metaDataValues.url != "")
    {
        
_loc1 _loc1 + ("<b><font size=\'10\' color=\'" _loc2 "\'>URL: </font></b><font color=\'" _loc3 "\'>" metaDataValues.url "</font>\n");
    } 
// end if
    
metaDataText.text _loc1;
    
robnei.html true;
    
robnei.htmlText _loc1;
// End of the function
function doConnect()
{
    if (
nc == null)
    {
        
nc = new NetConnection();
        
nc.onStatus = function (infoObject)
        {
            
trace ("nc: " infoObject.code " (" infoObject.description ")");
            if (
infoObject.code == "NetConnection.Connect.Success")
            {
                
playShoutcast();
            } 
// end if
        
};
        
nc.connect(_root.connect.connectStr.text);
        
enablePlayControls(true);
    }
    else
    {
        if (
nsPlay != null)
        {
            
nsPlay.attachVideo(null);
            
nsPlay.attachAudio(null);
        } 
// end if
        
nsPlay null;
        
nc.close();
        
nc null;
        
metaDataValues.title "";
        
metaDataValues.genre "";
        
metaDataValues.name "";
        
metaDataValues.url "";
        
updateMetaData();
        
enablePlayControls(false);
    } 
}
function 
enablePlayControls(isEnable)
{
}
function 
playShoutcast()
{
    
nsPlay = new NetStream(nc);
    
nsPlay.onStatus = function (infoObject)
    {
        
trace ("nsPlay: " infoObject.code " (" infoObject.description ")");
    };
    
nsPlay.onHeaderData = function (infoObject)
    {
        
trace ("onHeaderData");
        for (var 
_loc2 in infoObject)
        {
            
trace ("  " _loc2 " = " infoObject[_loc2]);
        } 
// end of for...in
        
if (infoObject["icy-genre"] != undefined)
        {
            
metaDataValues.genre infoObject["icy-genre"];
        } 
        if (
infoObject["icy-name"] != undefined)
        {
            
metaDataValues.name infoObject["icy-name"];
        }
        
updateMetaData();
    };
    
nsPlay.onMetaData = function (infoObject)
    {
        
trace ("onMetaData");
        for (var 
_loc2 in infoObject)
        {
            
trace ("  " _loc2 " = " infoObject[_loc2]);
        } 
// end of for...in
        
if (infoObject.StreamTitle != undefined)
        {
            
metaDataValues.title infoObject.StreamTitle;
        } 
// end if
        
if (infoObject.StreamUrl != undefined)
        {
            
metaDataValues.url infoObject.StreamUrl;
        } 
// end if
        
updateMetaData();
    };
    
nsPlay.setBufferTime(10);
    
nsPlay.play(_root.connect.streamStr.text);
    
soundRemote.attachAudio(nsPlay);
// End of the function
var nc null;
var 
nsPlay null;
var 
metaDataValues = new Array();
Stage.align "TL";
Stage.scaleMode "noScale";
_global.style.setStyle("backgroundColor""0xFFCC00 ");
initialize(); 
donde tendria que cambiar para que este en off
(chico en apuros)

Última edición por wagiro; 16/04/2012 a las 00:16 Razón: equivocación

Etiquetas: acc+conflashplayer, actionscript, flash, flash+cs5, php, play
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:35.