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

Ejecutar javascript a Botón Flash

Estas en el tema de Ejecutar javascript a Botón Flash en el foro de Flash y Actionscript en Foros del Web. Buenas, tengo la siguiente Web http://radiosenparaguay.net/ en donde al dar Play Gira la imagen de la Tapa.. lo hace mediante Código HTML: <a href= "javascript ...
  #1 (permalink)  
Antiguo 08/05/2013, 12:52
 
Fecha de Ingreso: diciembre-2009
Mensajes: 5
Antigüedad: 14 años, 4 meses
Puntos: 0
De acuerdo Ejecutar javascript a Botón Flash

Buenas, tengo la siguiente Web
http://radiosenparaguay.net/

en donde al dar Play Gira la imagen de la Tapa..

lo hace mediante

Código HTML:
<a href="javascript:;" class="jp-play audio_play" tabindex="1" style="display: block;">Play</a> 
seria jp-play

el problema es que el Botón de play ! quiero cambiarla a Flash por X motivo. ya cree el diseño similar al botón de dicha muestra, pero al dar play no gira la imagen de fondo..

el codigo en mi boton flash de mi Action es la siguiente

Código Javascript:
Ver original
  1. function initialize()
  2. {
  3.     _root.connect.streamStr.text = "http://xxx.xxx.xxx:xxx/";
  4.     _root.connect.connectStr.text = "rtmp://xxx:xxx/xxx";
  5.     _root.connect.connectButton.onPress = _root.doConnect;
  6.     _root.connect.connectButton2.onPress = _root.doConnect;
  7.     metaDataValues.title = "";
  8.     metaDataValues.genre = "";
  9.     metaDataValues.name = "";
  10.     metaDataValues.url = "";
  11.     doConnect();
  12.     trace (System.capabilities.version);
  13. }
  14. function updateMetaData()
  15. {
  16.     var _loc1 = "";
  17.     var _loc2 = "#FFFFFF";
  18.     var _loc3 = "#FFFFFF";
  19.     if (metaDataValues.title != "")
  20.     {
  21.         _loc1 = _loc1 + ("<b><font size=\'10\' color=\'" + _loc2 + "\'>Sonando: </font></b><font color=\'" + _loc3 + "\'>" + metaDataValues.title + "</font>\n");
  22.     } // end if
  23.     var _loc4 = "";
  24.     _loc4 = _loc4 + metaDataValues.title;
  25.     robnei.text = _loc4;
  26.     if (metaDataValues.genre != "")
  27.     {
  28.         _loc1 = _loc1 + ("<b><font size=\'10\' color=\'" + _loc2 + "\'>Genero: </font></b><font color=\'" + _loc3 + "\'>" + metaDataValues.genre + "</font>\n");
  29.     } // end if
  30.     if (metaDataValues.name != "")
  31.     {
  32.         _loc1 = _loc1 + ("<b><font size=\'10\' color=\'" + _loc2 + "\'>Emisora: </font></b><font color=\'" + _loc3 + "\'>" + metaDataValues.name + "</font>\n");
  33.     } // end if
  34.     if (metaDataValues.url != "")
  35.     {
  36.         _loc1 = _loc1 + ("<b><font size=\'10\' color=\'" + _loc2 + "\'>URL: </font></b><font color=\'" + _loc3 + "\'>" + metaDataValues.url + "</font>\n");
  37.     } // end if
  38.     metaDataText.text = _loc1;
  39.     robnei.html = true;
  40.     robnei.htmlText = _loc1;
  41. } // End of the function
  42. function doConnect()
  43. {
  44.     if (nc == null)
  45.     {
  46.         nc = new NetConnection();
  47.         nc.onStatus = function (infoObject)
  48.         {
  49.             trace ("nc: " + infoObject.code + " (" + infoObject.description + ")");
  50.             if (infoObject.code == "NetConnection.Connect.Success")
  51.             {
  52.                 playShoutcast();
  53.             } // end if
  54.         };
  55.         nc.connect(_root.connect.connectStr.text);
  56.         enablePlayControls(true);
  57.     }
  58.     else
  59.     {
  60.         if (nsPlay != null)
  61.         {
  62.             nsPlay.attachVideo(null);
  63.             nsPlay.attachAudio(null);
  64.         } // end if
  65.         nsPlay = null;
  66.         nc.close();
  67.         nc = null;
  68.         metaDataValues.title = "";
  69.         metaDataValues.genre = "";
  70.         metaDataValues.name = "";
  71.         metaDataValues.url = "";
  72.         updateMetaData();
  73.         enablePlayControls(false);
  74.     }
  75. }
  76. function enablePlayControls(isEnable)
  77. {
  78. }
  79. function playShoutcast()
  80. {
  81.     nsPlay = new NetStream(nc);
  82.     nsPlay.onStatus = function (infoObject)
  83.     {
  84.         trace ("nsPlay: " + infoObject.code + " (" + infoObject.description + ")");
  85.     };
  86.     nsPlay.onHeaderData = function (infoObject)
  87.     {
  88.         trace ("onHeaderData");
  89.         for (var _loc2 in infoObject)
  90.         {
  91.             trace ("  " + _loc2 + " = " + infoObject[_loc2]);
  92.         } // end of for...in
  93.         if (infoObject["icy-genre"] != undefined)
  94.         {
  95.             metaDataValues.genre = infoObject["icy-genre"];
  96.         }
  97.         if (infoObject["icy-name"] != undefined)
  98.         {
  99.             metaDataValues.name = infoObject["icy-name"];
  100.         }
  101.         updateMetaData();
  102.     };
  103.     nsPlay.onMetaData = function (infoObject)
  104.     {
  105.         trace ("onMetaData");
  106.         for (var _loc2 in infoObject)
  107.         {
  108.             trace ("  " + _loc2 + " = " + infoObject[_loc2]);
  109.         } // end of for...in
  110.         if (infoObject.StreamTitle != undefined)
  111.         {
  112.             metaDataValues.title = infoObject.StreamTitle;
  113.         } // end if
  114.         if (infoObject.StreamUrl != undefined)
  115.         {
  116.             metaDataValues.url = infoObject.StreamUrl;
  117.         } // end if
  118.         updateMetaData();
  119.     };
  120.     nsPlay.setBufferTime(10);
  121.     nsPlay.play(_root.connect.streamStr.text);
  122.     soundRemote.attachAudio(nsPlay);
  123. } // End of the function
  124. var nc = null;
  125. var nsPlay = null;
  126. var metaDataValues = new Array();
  127. Stage.align = "TL";
  128. Stage.scaleMode = "noScale";
  129. _global.style.setStyle("backgroundColor", "0xFFCC00 ");
  130. initialize();

quiero que al dar play la imagen del fondo gire como lo hace mediante el cod original.

Etiquetas: flash, javascript, swf
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 09:31.