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

reprodct con url flash

Estas en el tema de reprodct con url flash en el foro de Flash y Actionscript en Foros del Web. hola tengo un reproductor flash mp3 prefabricado pero me reproduce un archivo especificamente (beat.mp3) lo que quiero hacer es darle la url desdeel object en ...
  #1 (permalink)  
Antiguo 25/02/2011, 09:53
 
Fecha de Ingreso: enero-2011
Mensajes: 112
Antigüedad: 13 años, 3 meses
Puntos: 4
Pregunta reprodct con url flash

hola tengo un reproductor flash mp3 prefabricado pero me reproduce un archivo especificamente (beat.mp3) lo que quiero hacer es darle la url desdeel object en Dreamwevaver por favor ayudenme gracias
P.D : tanbien tengo el archivo .Fla
  #2 (permalink)  
Antiguo 25/02/2011, 10:09
 
Fecha de Ingreso: diciembre-2010
Ubicación: Madrid
Mensajes: 342
Antigüedad: 13 años, 4 meses
Puntos: 28
Respuesta: reprodct con url flash

Hola. Si tienes el .fla será más fácil hacerlo desde ahí. Ábrelo copia el código y lo posteas para mirarlo.
saludos
__________________
diseño web
  #3 (permalink)  
Antiguo 25/02/2011, 10:16
 
Fecha de Ingreso: enero-2011
Mensajes: 112
Antigüedad: 13 años, 3 meses
Puntos: 4
Respuesta: reprodct con url flash

Código Javascript:
Ver original
  1. //BUTTONS
  2. play_mc.addEventListener(MouseEvent.CLICK, playSong);
  3. play_mc.buttonMode = true;
  4. stop_mc.addEventListener(MouseEvent.CLICK, stopSong);
  5. stop_mc.buttonMode = true;
  6. update_mc.addEventListener(MouseEvent.CLICK, updateColors);
  7. update_mc.buttonMode = true;
  8.  
  9. //SOUND
  10. var songOne:Sound = new Sound(new URLRequest("beat.mp3"));
  11. var sc1:SoundChannel = new SoundChannel();
  12.  
  13. function playSong(e:Event):void
  14. {
  15.     sc1 = songOne.play(0,99);
  16.     play_mc.enabled = false;
  17. }
  18. function stopSong(e:Event):void
  19. {
  20.     sc1.stop();
  21.     play_mc.enabled = true;
  22. }
  23.  
  24. sc1 = songOne.play(0,99);
  25. play_mc.enabled = false;
  26.  
  27.  
  28. //VISUALIZER
  29. var lineAlpha:Number = 1.0;  //how visible the line in the center of the wave will be.  Values range from 0.0 - 1.0
  30. var lineColor:Number = 0xFF00FF;  //the initial line color, right now it's a pink color
  31. var lineThickness:Number = 2.0;  //how thick your line will be
  32. var red:String = red_txt.text;  //sets the red value to the initial value of red_txt
  33. var green:String = green_txt.text;  //sets the green value to the initial value of green_txt
  34. var blue:String = blue_txt.text;  //sets the blue value to the initial value of blue_txt
  35. var strength:Number = 1.0;  //how strong the glow is around the line
  36. var speedX:Number = 3.0;  //how fast the blur flows by on the X axis - to change direction, give a negative number
  37. var speedY:Number = 0.0;  //how fast the blur flows by on the Y axis - to change direction, give a negative number
  38.  
  39. //this function updates the colors when the "UPDATE" button is pressed
  40. function updateColors(e:MouseEvent):void
  41. {
  42.     red = red_txt.text;
  43.     blue = blue_txt.text;
  44.     green = green_txt.text;
  45.     lineColor = colorPicker.selectedColor;
  46.     visualizer();
  47. }
  48.  
  49. //this is the heart of the visualizer
  50. function visualizer()
  51. {
  52.     var ba:ByteArray = new ByteArray();
  53.     var bmd:BitmapData = new BitmapData(512, 300, true, 0x000000);  //IMPORTANT! - You want to make sure the first two parameters are your stage width and height respectively
  54.     var bm:Bitmap = new Bitmap(bmd);
  55.     addChild(bm);
  56.     var sp:Sprite = new Sprite();
  57.     addChild(sp);
  58.     var blur:BlurFilter = new BlurFilter(5,5,3);  //the paramaters for the Blur Filter - ex:  BlurFilter(blurX, blurY, Quality);
  59.     //the ColorMatrix below I do not know much about.  I do know you basically only want to alter the values I am altering.
  60.     var colorMatrix:ColorMatrixFilter = new ColorMatrixFilter([
  61.      red, 0, 0, 0, 0,
  62.          0, green, 0, 0, 0,
  63.          0, 0, blue, 0, 0,
  64.          0, 0, 0, strength, 0
  65.     ]);
  66.     addEventListener(Event.ENTER_FRAME, loop);  //sets up the loop function to run every frame per second
  67.  
  68.     //the "loop" function below draws the center wave line based off of the sound spectrum of your audio
  69.     function loop(e:Event):void
  70.     {
  71.         sp.graphics.clear();
  72.         sp.graphics.lineStyle(lineThickness, lineColor);
  73.         sp.graphics.moveTo(-1, stage.height/2);
  74.         sp.alpha = lineAlpha;
  75.         SoundMixer.computeSpectrum(ba);
  76.         for (var i:uint=0; i<256; i++)
  77.         {
  78.             var num:Number = -ba.readFloat()*200 + stage.height/2;
  79.             sp.graphics.lineTo(i*2, num);
  80.         }
  81.         bmd.draw(sp);
  82.         bmd.applyFilter(bmd,bmd.rect,new Point(),blur);  //applies the Blur Filter
  83.         bmd.applyFilter(bmd,bmd.rect,new Point(),colorMatrix);  //applies the ColorMatrix Filter
  84.         bmd.scroll(speedX,speedY); //this is where "speed" sets how fast the 'flow' of the filters will be
  85.        
  86.     }
  87. }
  88. visualizer();
  #4 (permalink)  
Antiguo 25/02/2011, 10:32
 
Fecha de Ingreso: enero-2011
Mensajes: 112
Antigüedad: 13 años, 3 meses
Puntos: 4
Respuesta: reprodct con url flash

pero yo no quiero que la url se ponga con el object
  #5 (permalink)  
Antiguo 25/02/2011, 11:04
 
Fecha de Ingreso: diciembre-2010
Ubicación: Madrid
Mensajes: 342
Antigüedad: 13 años, 4 meses
Puntos: 28
Respuesta: reprodct con url flash

Hola, primero dices:
Cita:
Iniciado por Derzz Ver Mensaje
hola tengo un reproductor flash mp3 prefabricado pero me reproduce un archivo especificamente (beat.mp3) lo que quiero hacer es darle la url desdeel object en Dreamwevaver por favor ayudenme gracias
P.D : tanbien tengo el archivo .Fla
¿Pero ahora dices que no quieres ponerla en el object?
¿Qué es lo que quieres hacer? no te sigo...
saludos
__________________
diseño web
  #6 (permalink)  
Antiguo 25/02/2011, 11:36
 
Fecha de Ingreso: enero-2011
Mensajes: 112
Antigüedad: 13 años, 3 meses
Puntos: 4
Respuesta: reprodct con url flash

zorry me webie ez la primera eske era para ver zi eztaban atentoz!!! @-@
manejar con el object

Etiquetas: derzz, flash
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 05:46.