Comunidad de diseño web y desarrollo en internet online

ayuda para convertir un codigo as2 en as3

Citar            
MensajeEscrito el 28 Nov 2010 12:40 am
hola amigos tengo un reproductor de streaming en as2 y quisiera convertirlo en as3 pero la vdd no se nada de as3 aqui les dejo el codigo a ver q dicen

Código :

function initialize()
{
    _root.connect.streamStr.text = "http://aquivaladirecciondemiradio/";
    _root.connect.connectStr.text = "rtmp://aquivamirtmp/shoutcast";
    _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);
} // End of the function
function updateMetaData()
{
    var _loc1 = "";
    if (metaDataValues.title != "")
    {
        _loc1 = _loc1 + ("<b><font size=\'11\'>" + metaDataValues.title + "</font></b>\n");
    } // end if
    var _loc2 = "";
    _loc2 = _loc2 + metaDataValues.title;
    texto1.text = _loc2;
    if (metaDataValues.name != "")
    {
    } // end if
    if (metaDataValues.url != "")
    {
    } // end if
    metaDataText.text = _loc1;
    texto1.html = true;
    texto1.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);
    } // end else if
} // End of the function
function enablePlayControls(isEnable)
{
} // End of the function
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"];
        } // end if
        if (infoObject["icy-name"] != undefined)
        {
            metaDataValues.name = infoObject["icy-name"];
        } // end if
        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(5);
    nsPlay.play(_root.connect.streamStr.text);
    soundRemote.attachAudio(nsPlay);
} // End of the function
this.mc_vc.show_percent = true;
this.mc_vc.shadow = {distance: 0, angle: 0, color: 0};
var nc = null;
var nsPlay = null;
var metaDataValues = new Array();
Stage.align = "TL";
Stage.scaleMode = "noScale";
_global.style.setStyle("backgroundColor", "0xFFCC00 ");
initialize();
_root.musicPlayer.gotoAndPlay(1);
musicPlays = true;

Por andrewswillians

15 de clabLevel



 

msie8
Citar            
MensajeEscrito el 28 Nov 2010 07:21 pm
Te digo lo que lo olvides, aquí no hacemos el trabajo de nadie gratis. Si quieres te ayudamos a entender AS3, pero ¿Pasarte todo el código? Forget it man.

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 29 Nov 2010 01:24 am
hola amigo quisiera un poco de ayuda para entender as3 pero no tengo ni idea de como son los codigos as3 ya que solo manejo as2

Por andrewswillians

15 de clabLevel



 

msie8
Citar            
MensajeEscrito el 29 Nov 2010 03:44 am
Pues lee el libro de Coolin Mock, Action Script 3 Essentials. Eso hará el truco.

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 19 May 2011 11:37 pm
:) :) No se si esto viola los terminos de la pagina... Pero... Bueh :P

Yo tengo un grupo en Facebook, donde todos nos ayudamos en los diferentes tipos de Lenguajes de Programacion... En mi caso yo estudio AS3 y ayudo a dar a entenderlo... Si te interesa puedes unirte nos:

Programadores Latinoamerica

Por Dashyear

1 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.